Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywmaterial:create', 'æ°å»ºè¿ç»´èµäº§ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywmaterial:delete', 'å é¤è¿ç»´èµäº§ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywmaterial:update', 'ä¿®æ¹è¿ç»´èµäº§ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywmaterial:query', 'æ¥è¯¢è¿ç»´èµäº§ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywmaterial:exportExcel', '导åºè¿ç»´èµäº§ä¿¡æ¯è¡¨(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinbound:create', 'æ°å»ºè¿ç»´åºå
¥åºä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinbound:delete', 'å é¤è¿ç»´åºå
¥åºä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinbound:update', 'ä¿®æ¹è¿ç»´åºå
¥åºä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinbound:query', 'æ¥è¯¢è¿ç»´åºå
¥åºä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinbound:exportExcel', '导åºè¿ç»´åºå
¥åºä¿¡æ¯è¡¨(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinboundrecord:create', 'æ°å»ºè¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinboundrecord:delete', 'å é¤è¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinboundrecord:update', 'ä¿®æ¹è¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinboundrecord:query', 'æ¥è¯¢è¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywoutinboundrecord:exportExcel', '导åºè¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywproblem:create', 'æ°å»ºè¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywproblem:delete', 'å é¤è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywproblem:update', 'ä¿®æ¹è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywproblem:query', 'æ¥è¯¢è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywproblem:exportExcel', '导åºè¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstock:create', 'æ°å»ºè¿ç»´åºåä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstock:delete', 'å é¤è¿ç»´åºåä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstock:update', 'ä¿®æ¹è¿ç»´åºåä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstock:query', 'æ¥è¯¢è¿ç»´åºåä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstock:exportExcel', '导åºè¿ç»´åºåä¿¡æ¯è¡¨(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktaking:create', 'æ°å»ºè¿ç»´çç¹ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktaking:delete', 'å é¤è¿ç»´çç¹ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktaking:update', 'ä¿®æ¹è¿ç»´çç¹ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktaking:query', 'æ¥è¯¢è¿ç»´çç¹ä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktaking:exportExcel', '导åºè¿ç»´çç¹ä¿¡æ¯è¡¨(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktakingrecord:create', 'æ°å»ºè¿ç»´çç¹æç»è®°å½è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktakingrecord:delete', 'å é¤è¿ç»´çç¹æç»è®°å½è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktakingrecord:update', 'ä¿®æ¹è¿ç»´çç¹æç»è®°å½è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktakingrecord:query', 'æ¥è¯¢è¿ç»´çç¹æç»è®°å½è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywstocktakingrecord:exportExcel', '导åºè¿ç»´çç¹æç»è®°å½è¡¨(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywwarehouse:create', 'æ°å»ºè¿ç»´ä»åºä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywwarehouse:delete', 'å é¤è¿ç»´ä»åºä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywwarehouse:update', 'ä¿®æ¹è¿ç»´ä»åºä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywwarehouse:query', 'æ¥è¯¢è¿ç»´ä»åºä¿¡æ¯è¡¨', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywwarehouse:exportExcel', '导åºè¿ç»´ä»åºä¿¡æ¯è¡¨(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| | |
| | | public static final String YW_DEVICE ="YW_DEVICE" ; |
| | | public static final String YW_PATROL ="YW_PATROL" ; |
| | | public static final String YW_CONTRACT_BILL ="YW_CONTRACT_BILL" ; |
| | | public static final String YW_MATERIAL ="YW_MATERIAL" ; |
| | | |
| | | public static final String RESERVATION_TOTAL_NUM ="RESERVATION_TOTAL_NUM" ; |
| | | public static final String SIGN_IN_PLACE_LAT ="SIGN_IN_PLACE_LAT" ; |
| | |
| | | public static final long EXPIRE_TIME = 7200; |
| | | |
| | | public static final String INTERNAL_TOKEN ="INTERNAL_TOKEN"; |
| | | public static final String COM_OUTBOUND_OUT_KEY = "obout_"; |
| | | public static final String COM_OUTBOUND_IN_KEY = "obin_"; |
| | | public static final String COM_OUTBOUND_TAKING_KEY = "obtaking_"; |
| | | |
| | | public static final String GOODSORDER_KEY = "ordercode_"; |
| | | public static final String ACTIVITY_SIGN_KEY = "actcode_"; |
| | |
| | | int otherDeal = 5;//ä»äººå·²å¤ç |
| | | int otherUnPass = 6;//ä»äººæç» |
| | | } |
| | | |
| | | |
| | | |
| | | //ç±»å 0éè´å
¥åº 1é¢ç¨éå 2åºåè°æ´å
¥åº 3å
¶ä»å
¥åº 4ççå
¥åº 5é¢ç¨åºåº 6ä»åºåºåº 7è°æ´åºåº 8éè´åºåº 9å
¶ä»åºåº 10çäºåºåº |
| | | public enum ywOutInType{ |
| | | BUY_IN(0, 0), |
| | | USE_RETURN_IN(1, 0), |
| | | STOCK_IN(2, 0), |
| | | OTHER_IN(3, 0), |
| | | TAKING_IN(4, 0), |
| | | USE_OUT(5, 1), |
| | | HOUSE_OUT(6, 1), |
| | | STOCK_OUT(7, 1), |
| | | OTHER_UN_PASS_OUT(8, 1), |
| | | BUY_OUT(9, 1), |
| | | TAKING_OUT(10, 1) |
| | | ; |
| | | // æååé |
| | | private int key; |
| | | private int inOut; |
| | | |
| | | // æé æ¹æ³ |
| | | ywOutInType(int key, int inOut) { |
| | | this.inOut = inOut; |
| | | this.key = key; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static Integer getInOutValue(int index) { |
| | | for (ywOutInType c : ywOutInType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.getInOut(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static ywOutInType getYwOutInType(int index) { |
| | | for (ywOutInType c : ywOutInType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®åºå
¥åºç±»åè·åææçå
·ä½ç±»å |
| | | * @param inOutType |
| | | * @return |
| | | */ |
| | | public static List<Integer> getAllTypeKey(int inOutType) { |
| | | List<Integer> list = new ArrayList<>(); |
| | | for (ywOutInType c : ywOutInType.values()) { |
| | | if (c.getInOut() == inOutType) { |
| | | list.add(c.getKey()); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | // get set æ¹æ³ |
| | | public int getInOut() { |
| | | return inOut; |
| | | } |
| | | |
| | | public void setInOut(int inOut) { |
| | | this.inOut = inOut; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * è·å车çç±»åä¿¡æ¯ |
| | |
| | | YW_CONTRACT_FILE(9, "ååéä»¶ ", "ååéä»¶ "), |
| | | FN_CONTRACT_REVENUE_FILE(10, "æ¶æ¯æµæ°´éä»¶ ", "ååè´¦åéä»¶ "), |
| | | FN_PATROL_TASK_RECORD_FILE(11, "å·¡æ£ä»»å¡ç¹å¤çéä»¶ ", "å·¡æ£ä»»å¡ç¹å¤çéä»¶ "), |
| | | MATERIAL_FILE(12, "èµäº§éä»¶ ", "èµäº§éä»¶ "), |
| | | PROBLEM_FILE(13, "é®é¢éä»¶ ", "é®é¢éä»¶ "), |
| | | |
| | | ; |
| | | // æååé |
| | |
| | | @ExcelColumn(name="ç±»å0å¾ç 1è§é¢ 2å
¶ä»") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "å
³è对象类å 0鿣ç°åºæ
åµ 1鿣å¤çåæ
åµ 2鿣å¤çåæ
åµ 3鿣éå说æ 4ä¼è®®å®¤æä»¶ 5éå®è®¾å¤å¾ç 6éå®è®¾å¤è¿ç»´å¾ç", example = "1") |
| | | @ExcelColumn(name="å
³è对象类å 0鿣ç°åºæ
åµ 1鿣å¤çåæ
åµ 2鿣å¤çåæ
åµ 3鿣éå说æ 4ä¼è®®å®¤æä»¶ 5éå®è®¾å¤å¾ç 6éå®è®¾å¤è¿ç»´å¾ç") |
| | | @ApiModelProperty(value = "å
³è对象类å 0鿣ç°åºæ
åµ 1鿣å¤çåæ
åµ 2鿣å¤çåæ
åµ 3鿣éå说æ 4ä¼è®®å®¤æä»¶ 5éå®è®¾å¤å¾ç 6éå®è®¾å¤è¿ç»´å¾ç 7èµäº§éä»¶", example = "1") |
| | | @ExcelColumn(name="å
³è对象类å 0鿣ç°åºæ
åµ 1鿣å¤çåæ
åµ 2鿣å¤çåæ
åµ 3鿣éå说æ 4ä¼è®®å®¤æä»¶ 5éå®è®¾å¤å¾ç 6éå®è®¾å¤è¿ç»´å¾ç 7èµäº§éä»¶") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "æä»¶å°å") |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.core.utils.redis.RedisUtil; |
| | | import com.doumee.core.wx.WXConstant; |
| | | import com.doumee.dao.business.model.YwContract; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import com.doumee.service.business.YwContractBillService; |
| | | import com.doumee.service.business.YwContractService; |
| | | import com.doumee.service.business.YwPatrolSchemeService; |
| | | import com.doumee.dao.business.model.YwOutinbound; |
| | | import com.doumee.service.business.*; |
| | | import com.doumee.service.business.impl.YwOutinboundServiceImpl; |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @Autowired |
| | | private YwPatrolSchemeService ywPatrolSchemeService; |
| | | |
| | | @Autowired |
| | | private YwOutinboundService ywOutinboundService; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | |
| | | @ApiOperation("宿¶å¤çååè´¦åç¼ç ") |
| | | @GetMapping("/ywDealContractBillCodeTimer") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("宿¶çæä»æ¥å·¡æ£ä»»å¡ä»»å¡") |
| | | @GetMapping("/ywPatrolSchemeTaskTimer") |
| | | public ApiResponse ywPatrolSchemeTaskTimer() { |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation("宿¶æ´æ°redisæ°æ®") |
| | | @GetMapping("/ywUpdRedisDataTimer") |
| | | public ApiResponse ywUpdRedisDataTimer() { |
| | | //å å
¥redisç¼åï¼å
¥åºåæ»æ°é |
| | | RedisUtil.addObject(redisTemplate, Constants.RedisKeys.COM_OUTBOUND_IN_KEY,0); |
| | | //å å
¥redisç¼åï¼åºåºåæ»æ°é |
| | | RedisUtil.addObject(redisTemplate,Constants.RedisKeys.COM_OUTBOUND_OUT_KEY,0); |
| | | //å å
¥redisç¼åï¼çç¹åæ»æ°é |
| | | RedisUtil.addObject(redisTemplate,Constants.RedisKeys.COM_OUTBOUND_TAKING_KEY,0); |
| | | return ApiResponse.success("宿¶æ´æ°redisæ°æ®"); |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwMaterial; |
| | | import com.doumee.service.business.YwMaterialService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Api(tags = "è¿ç»´èµäº§ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywMaterial") |
| | | public class YwMaterialController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwMaterialService ywMaterialService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywmaterial:create") |
| | | public ApiResponse create(@RequestBody YwMaterial ywMaterial,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywMaterial.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywMaterialService.create(ywMaterial)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywmaterial:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywMaterialService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywmaterial:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywMaterialService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywmaterial:update") |
| | | public ApiResponse updateById(@RequestBody YwMaterial ywMaterial,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywMaterialService.updateById(ywMaterial); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹ç¶æ") |
| | | @PostMapping("/updateStatus") |
| | | @CloudRequiredPermission("business:ywmaterial:update") |
| | | public ApiResponse updateStatus(@RequestBody YwMaterial ywMaterial,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywMaterialService.updateStatus(ywMaterial); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywmaterial:query") |
| | | public ApiResponse<PageData<YwMaterial>> findPage (@RequestBody PageWrap<YwMaterial> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywMaterialService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywmaterial:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwMaterial> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwMaterial.class).export(ywMaterialService.findPage(pageWrap).getRecords(), "è¿ç»´èµäº§ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywmaterial:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywMaterialService.getDetail(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwOutinbound; |
| | | import com.doumee.service.business.YwOutinboundService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Api(tags = "è¿ç»´åºå
¥åºä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywOutinbound") |
| | | public class YwOutinboundController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwOutinboundService ywOutinboundService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywoutinbound:create") |
| | | public ApiResponse create(@RequestBody YwOutinbound ywOutinbound,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywOutinbound.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywOutinboundService.create(ywOutinbound)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywoutinbound:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywOutinboundService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywoutinbound:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywOutinboundService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywoutinbound:update") |
| | | public ApiResponse updateById(@RequestBody YwOutinbound ywOutinbound,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywOutinbound.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywOutinboundService.updateById(ywOutinbound); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywoutinbound:query") |
| | | public ApiResponse<PageData<YwOutinbound>> findPage (@RequestBody PageWrap<YwOutinbound> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywOutinboundService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywoutinbound:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwOutinbound> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwOutinbound.class).export(ywOutinboundService.findPage(pageWrap).getRecords(), "è¿ç»´åºå
¥åºä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywoutinbound:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywOutinboundService.getDetail(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwProblem; |
| | | import com.doumee.service.business.YwProblemService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Api(tags = "è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywProblem") |
| | | public class YwProblemController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwProblemService ywProblemService; |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("é®é¢ææ¥") |
| | | @PostMapping("/create") |
| | | public ApiResponse create(@RequestBody YwProblem ywProblem) { |
| | | return ApiResponse.success(ywProblemService.create(ywProblem)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywproblem:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | ywProblemService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywproblem:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywProblemService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywproblem:update") |
| | | public ApiResponse updateById(@RequestBody YwProblem ywProblem) { |
| | | ywProblemService.updateById(ywProblem); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywproblem:query") |
| | | public ApiResponse<PageData<YwProblem>> findPage (@RequestBody PageWrap<YwProblem> pageWrap) { |
| | | return ApiResponse.success(ywProblemService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywproblem:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwProblem> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(YwProblem.class).export(ywProblemService.findPage(pageWrap).getRecords(), "è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywproblem:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(ywProblemService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwStock; |
| | | import com.doumee.service.business.YwStockService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Api(tags = "è¿ç»´åºåä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywStock") |
| | | public class YwStockController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwStockService ywStockService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywstock:create") |
| | | public ApiResponse create(@RequestBody YwStock ywStock) { |
| | | return ApiResponse.success(ywStockService.create(ywStock)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywstock:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | ywStockService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywstock:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywStockService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywstock:update") |
| | | public ApiResponse updateById(@RequestBody YwStock ywStock) { |
| | | ywStockService.updateById(ywStock); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywstock:query") |
| | | public ApiResponse<PageData<YwStock>> findPage (@RequestBody PageWrap<YwStock> pageWrap) { |
| | | return ApiResponse.success(ywStockService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywstock:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwStock> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(YwStock.class).export(ywStockService.findPage(pageWrap).getRecords(), "è¿ç»´åºåä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywstock:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(ywStockService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwStocktaking; |
| | | import com.doumee.service.business.YwStocktakingService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Api(tags = "è¿ç»´çç¹ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywStocktaking") |
| | | public class YwStocktakingController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwStocktakingService ywStocktakingService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywstocktaking:create") |
| | | public ApiResponse create(@RequestBody YwStocktaking ywStocktaking,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktaking.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywStocktakingService.create(ywStocktaking)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywstocktaking:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingService.deleteById(id,getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywstocktaking:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywStocktakingService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywstocktaking:update") |
| | | public ApiResponse updateById(@RequestBody YwStocktaking ywStocktaking,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingService.updateById(ywStocktaking); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywstocktaking:query") |
| | | public ApiResponse<PageData<YwStocktaking>> findPage (@RequestBody PageWrap<YwStocktaking> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywStocktakingService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywstocktaking:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwStocktaking> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwStocktaking.class).export(ywStocktakingService.findPage(pageWrap).getRecords(), "è¿ç»´çç¹ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywstocktaking:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywStocktakingService.getDetail(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("åæ¶çç¹å") |
| | | @GetMapping("/cancelById") |
| | | @CloudRequiredPermission("business:ywstocktaking:delete") |
| | | public ApiResponse cancelById(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingService.cancelById(id,getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å¼å§çç¹å") |
| | | @GetMapping("/beginById") |
| | | @CloudRequiredPermission("business:ywstocktaking:delete") |
| | | public ApiResponse beginById(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingService.beginById(id,getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("宿çç¹å") |
| | | @GetMapping("/finishById") |
| | | @CloudRequiredPermission("business:ywstocktaking:delete") |
| | | public ApiResponse finishById(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingService.finishById(id,getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwStocktakingRecord; |
| | | import com.doumee.service.business.YwStocktakingRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Api(tags = "è¿ç»´çç¹æç»è®°å½è¡¨") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywStocktakingRecord") |
| | | public class YwStocktakingRecordController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwStocktakingRecordService ywStocktakingRecordService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywstocktakingrecord:create") |
| | | public ApiResponse create(@RequestBody YwStocktakingRecord ywStocktakingRecord,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywStocktakingRecordService.create(ywStocktakingRecord)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywstocktakingrecord:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingRecordService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywstocktakingrecord:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywStocktakingRecordService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywstocktakingrecord:update") |
| | | public ApiResponse updateById(@RequestBody YwStocktakingRecord ywStocktakingRecord,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingRecordService.updateById(ywStocktakingRecord); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywstocktakingrecord:query") |
| | | public ApiResponse<PageData<YwStocktakingRecord>> findPage (@RequestBody PageWrap<YwStocktakingRecord> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywStocktakingRecordService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywstocktakingrecord:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwStocktakingRecord> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwStocktakingRecord.class).export(ywStocktakingRecordService.findPage(pageWrap).getRecords(), "è¿ç»´çç¹æç»è®°å½è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywstocktakingrecord:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywStocktakingRecordService.getDetail(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("çç¹æäº¤") |
| | | @PostMapping("/takingData") |
| | | @CloudRequiredPermission("business:ywstocktakingrecord:update") |
| | | public ApiResponse takingData(@RequestBody YwStocktakingRecord ywStocktakingRecord,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywStocktakingRecord.setLoginUserInfo(getLoginUser(token)); |
| | | ywStocktakingRecordService.takingData(ywStocktakingRecord); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwWarehouse; |
| | | import com.doumee.service.business.YwWarehouseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Api(tags = "è¿ç»´ä»åºä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywWarehouse") |
| | | public class YwWarehouseController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwWarehouseService ywWarehouseService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywwarehouse:create") |
| | | public ApiResponse create(@RequestBody YwWarehouse ywWarehouse,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywWarehouse.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywWarehouseService.create(ywWarehouse)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywwarehouse:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywWarehouseService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | // |
| | | // @ApiOperation("æ¹éå é¤") |
| | | // @GetMapping("/delete/batch") |
| | | // @CloudRequiredPermission("business:ywwarehouse:delete") |
| | | // public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | // String [] idArray = ids.split(","); |
| | | // List<Integer> idList = new ArrayList<>(); |
| | | // for (String id : idArray) { |
| | | // idList.add(Integer.valueOf(id)); |
| | | // } |
| | | // ywWarehouseService.deleteByIdInBatch(idList); |
| | | // return ApiResponse.success(null); |
| | | // } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywwarehouse:update") |
| | | public ApiResponse updateById(@RequestBody YwWarehouse ywWarehouse,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywWarehouseService.updateById(ywWarehouse); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywwarehouse:query") |
| | | public ApiResponse<PageData<YwWarehouse>> findPage (@RequestBody PageWrap<YwWarehouse> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywWarehouseService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å表æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:ywwarehouse:query") |
| | | public ApiResponse<List<YwWarehouse>> findList (@RequestBody YwWarehouse model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywWarehouseService.findList(model)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywwarehouse:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwWarehouse> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwWarehouse.class).export(ywWarehouseService.findPage(pageWrap).getRecords(), "è¿ç»´ä»åºä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywwarehouse:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywWarehouseService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwMaterial; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwMaterialMapper extends MPJBaseMapper<YwMaterial> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwOutinbound; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwOutinboundMapper extends MPJBaseMapper<YwOutinbound> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwOutinboundRecord; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 14:28 |
| | | */ |
| | | public interface YwOutinboundRecordMapper extends MPJBaseMapper<YwOutinboundRecord> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwProblem; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwProblemMapper extends BaseMapper<YwProblem> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwStock; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwStockMapper extends MPJBaseMapper<YwStock> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwStocktaking; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwStocktakingMapper extends MPJBaseMapper<YwStocktaking> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwStocktakingRecord; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwStocktakingRecordMapper extends MPJBaseMapper<YwStocktakingRecord> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwWarehouse; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwWarehouseMapper extends MPJBaseMapper<YwWarehouse> { |
| | | |
| | | } |
| | |
| | | //@ExcelColumn(name="徿 ") |
| | | private String imgurl; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0å
¬å¸ç±»å 1车è¾ç±»å 2è¿ç»´-客æ·è¡ä¸åç±» 3è¿ç»´-å·¥ååç±» 4è¿ç»´-å·¡æ£åºå 5è¿ç»´-设å¤åç±» 6=客æ·è¡ä¸" ) |
| | | @ApiModelProperty(value = "ç±»å 0å
¬å¸ç±»å 1车è¾ç±»å 2è¿ç»´-客æ·è¡ä¸åç±» 3è¿ç»´-å·¥ååç±» 4è¿ç»´-å·¡æ£åºå 5è¿ç»´-设å¤åç±» 6=客æ·è¡ä¸ 7=èµäº§åç±»" ) |
| | | //@ExcelColumn(name="ç±»å 0å
¬å¸ç±»å 1车è¾ç±»å") |
| | | private Integer type; |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * è¿ç»´èµäº§ä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´èµäº§ä¿¡æ¯è¡¨") |
| | | @TableName("`yw_material`") |
| | | public class YwMaterial extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | @ExcelColumn(name="åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "ç¼å·") |
| | | @ExcelColumn(name="ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "æå±ä¸çº§åç±»ç¼ç ï¼å
³ècategory)", example = "1") |
| | | @ExcelColumn(name="æå±ä¸çº§åç±»ç¼ç ï¼å
³ècategory)") |
| | | private Integer parentCateId; |
| | | |
| | | @ApiModelProperty(value = "æå±äºçº§åç±»ç¼ç (å
³ècategoryï¼", example = "1") |
| | | @ExcelColumn(name="æå±äºçº§åç±»ç¼ç (å
³ècategoryï¼") |
| | | private Integer cateId; |
| | | |
| | | @ApiModelProperty(value = "æ¡ç ") |
| | | @ExcelColumn(name="æ¡ç ") |
| | | private String qrcode; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "åç") |
| | | @ExcelColumn(name="åç") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | @ExcelColumn(name="è§æ ¼åå·") |
| | | private String attr; |
| | | |
| | | @ApiModelProperty(value = "å®å
¨åºåï¼ä¸éï¼", example = "1") |
| | | @ExcelColumn(name="å®å
¨åºåï¼ä¸éï¼") |
| | | private BigDecimal minStock; |
| | | |
| | | @ApiModelProperty(value = "å®å
¨åºåï¼ä¸éï¼", example = "1") |
| | | @ExcelColumn(name="å®å
¨åºåï¼ä¸éï¼") |
| | | private BigDecimal maxStock; |
| | | |
| | | @ApiModelProperty(value = "åä½") |
| | | @ExcelColumn(name="åä½") |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¿æºç¼ç (å
³èyw_room)", example = "1") |
| | | @ExcelColumn(name="æå±æ¿æºç¼ç (å
³èyw_room)") |
| | | private Integer roomId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦èªå¨ç¼ç ï¼0=å¦ï¼1=æ¯ï¼", example = "1") |
| | | @ExcelColumn(name="æ¯å¦èªå¨ç¼ç ï¼0=å¦ï¼1=æ¯ï¼") |
| | | private Integer autoCode; |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯", example = "1") |
| | | @TableField(exist = false) |
| | | private Multifile multifile; |
| | | |
| | | @ApiModelProperty(value = "æå±é¡¹ç®ä¸»é®", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer projectId; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´åºå
¥åºä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´åºå
¥åºä¿¡æ¯è¡¨") |
| | | @TableName("`yw_outinbound`") |
| | | public class YwOutinbound extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ä»åºç¼ç (å
³èyw_warehouse)") |
| | | @ExcelColumn(name="ä»åºç¼ç (å
³èyw_warehouse)") |
| | | private Integer warehouseId; |
| | | |
| | | @ApiModelProperty(value = "ç©èµç¼ç ï¼å
³èyw_material)", example = "1") |
| | | @ExcelColumn(name="ç©èµç¼ç ï¼å
³èyw_material)") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "æ°é", example = "1") |
| | | @ExcelColumn(name="æ°é") |
| | | private BigDecimal stock; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0éè´å
¥åº 1é¢ç¨éå 2è°æ´å
¥åº 3å
¶ä»å
¥åº 4ççå
¥åº 5é¢ç¨åºåº 6ä»åºåºåº 7è°æ´åºåº 8éè´åºåº 9å
¶ä»åºåº 10çäºåºåº", example = "1") |
| | | @ExcelColumn(name="ç±»å 0éè´å
¥åº 1é¢ç¨éå 2è°æ´å
¥åº 3å
¶ä»å
¥åº 4ççå
¥åº 5é¢ç¨åºåº 6ä»åºåºåº 7è°æ´åºåº 8éè´åºåº 9å
¶ä»åºåº 10çäºåºåº") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "æ¥æº 0æå¨å½å
¥ 1ç³»ç»çæ", example = "1") |
| | | @ExcelColumn(name="æ¥æº 0æå¨å½å
¥ 1ç³»ç»çæ") |
| | | private Integer origin; |
| | | |
| | | @ApiModelProperty(value = "说æ") |
| | | @ExcelColumn(name="说æ") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "åºå
¥åºæ¥æ") |
| | | @ExcelColumn(name="åºå
¥åºæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date doneDate; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0æ£å¸¸", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0æ£å¸¸") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "åæ®ç¼å·") |
| | | @ExcelColumn(name="åæ®ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "åºå
¥åºæ°æ®æç»", example = "1") |
| | | @TableField(exist = false) |
| | | private List<YwOutinboundRecord> recordList; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æä½ç±»åï¼1=åºåºï¼0=å
¥åºï¼å页å表æ¥è¯¢ä½¿ç¨ï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer inOut; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String warehouseName; |
| | | |
| | | @ApiModelProperty(value = "æä½äººåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String createUserName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * è¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 14:28 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨") |
| | | @TableName("`yw_outinbound_record`") |
| | | public class YwOutinboundRecord { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "åºå
¥åºè®°å½ä¸»é®", example = "1") |
| | | @ExcelColumn(name="åºå
¥åºè®°å½ä¸»é®") |
| | | private Integer outInBoundId; |
| | | |
| | | @ApiModelProperty(value = "ç©èµç¼ç ï¼å
³èyw_material)", example = "1") |
| | | @ExcelColumn(name="ç©èµç¼ç ï¼å
³èyw_material)") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "æ°é", example = "1") |
| | | @ExcelColumn(name="æ°é") |
| | | private BigDecimal stock; |
| | | |
| | | @ApiModelProperty(value = "èµäº§ç¼ç ") |
| | | @TableField(exist = false) |
| | | private String materialCode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç§°") |
| | | @TableField(exist = false) |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty(value = "èµäº§æ¡å½¢ç ") |
| | | @TableField(exist = false) |
| | | private String materialQrcode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç") |
| | | @TableField(exist = false) |
| | | private String materialBrand; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åä½") |
| | | @TableField(exist = false) |
| | | private String materialUnitName; |
| | | |
| | | @ApiModelProperty(value = "æä½ç±»åï¼1=åºåºï¼0=å
¥åºï¼å页å表æ¥è¯¢ä½¿ç¨ï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer inOut; |
| | | |
| | | @ApiModelProperty(value = "ä»åºä¸»é®") |
| | | @TableField(exist = false) |
| | | private Integer warehouseId; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°") |
| | | @TableField(exist = false) |
| | | private String warehouseName; |
| | | |
| | | @ApiModelProperty(value = "åæ®æ¥æ") |
| | | @TableField(exist = false) |
| | | private Date doneDate; |
| | | |
| | | @ApiModelProperty(value = "ä¸çº§åç±»åç§°") |
| | | @TableField(exist = false) |
| | | private String categoryParentName; |
| | | |
| | | @ApiModelProperty(value = "äºçº§åç±»åç§°") |
| | | @TableField(exist = false) |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty(value = "æä½äººåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "åæ®ç¼å·", example = "1") |
| | | @TableField(exist = false) |
| | | private String code; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åæ®æ¥æ å¼å§ yyyy-MM-dd", example = "1") |
| | | @TableField(exist = false) |
| | | private String doneDateStart; |
| | | |
| | | @ApiModelProperty(value = "åæ®æ¥æ ç»æ yyyy-MM-dd", example = "1") |
| | | @TableField(exist = false) |
| | | private String doneDateEnd; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ å¼å§ yyyy-MM-dd", example = "1") |
| | | @TableField(exist = false) |
| | | private String createDateStart; |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ ç»æ yyyy-MM-dd", example = "1") |
| | | @TableField(exist = false) |
| | | private String createDateEnd; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨") |
| | | @TableName("`yw_problem`") |
| | | public class YwProblem { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "ä½ç½®") |
| | | @ExcelColumn(name="ä½ç½®") |
| | | private String position; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æ
åµè¯´æ") |
| | | @ExcelColumn(name="æ
åµè¯´æ") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "䏿¥äººå§å") |
| | | @ExcelColumn(name="䏿¥äººå§å") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "èç³»çµè¯") |
| | | @ExcelColumn(name="èç³»çµè¯") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "ææ¥æ¶é´") |
| | | @ExcelColumn(name="ææ¥æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date submitDate; |
| | | |
| | | @ApiModelProperty(value = "ç¼å·") |
| | | @ExcelColumn(name="ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "å¤çç¶æ 0å¾
å¤ç 1已转工å 2å·²å
³é", example = "1") |
| | | @ExcelColumn(name="å¤çç¶æ 0å¾
å¤ç 1已转工å 2å·²å
³é") |
| | | private Integer dealStatus; |
| | | |
| | | @ApiModelProperty(value = "å¤ç人ç¼ç (å
³èsystem_user)", example = "1") |
| | | @ExcelColumn(name="å¤ç人ç¼ç (å
³èsystem_user)") |
| | | private Integer dealUserId; |
| | | |
| | | @ApiModelProperty(value = "å¤çæ¶é´") |
| | | @ExcelColumn(name="å¤çæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date dealDate; |
| | | |
| | | @ApiModelProperty(value = "å¤ç夿³¨") |
| | | @ExcelColumn(name="å¤ç夿³¨") |
| | | private String dealInfo; |
| | | |
| | | @ApiModelProperty(value = "å¤çæ¹å¼ 0转工å 1å
³é", example = "1") |
| | | @ExcelColumn(name="å¤çæ¹å¼ 0转工å 1å
³é") |
| | | private Integer dealType; |
| | | |
| | | @ApiModelProperty(value = "å
³èå·¥åç¼ç ï¼å
³èyw_workorder)", example = "1") |
| | | @ExcelColumn(name="å
³èå·¥åç¼ç ï¼å
³èyw_workorder)") |
| | | private Integer workorderId; |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯") |
| | | @TableField(exist = false) |
| | | private List<Multifile> fileList; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * è¿ç»´åºåä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´åºåä¿¡æ¯è¡¨") |
| | | @TableName("`yw_stock`") |
| | | public class YwStock { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ä»åºç¼ç (å
³èyw_warehouse)") |
| | | @ExcelColumn(name="ä»åºç¼ç (å
³èyw_warehouse)") |
| | | private Integer warehouseId; |
| | | |
| | | @ApiModelProperty(value = "ç©èµç¼ç ï¼å
³èyw_material)", example = "1") |
| | | @ExcelColumn(name="ç©èµç¼ç ï¼å
³èyw_material)") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "æ°é", example = "1") |
| | | @ExcelColumn(name="æ°é") |
| | | private BigDecimal stock; |
| | | |
| | | |
| | | @ApiModelProperty(value = "èµäº§ç¼ç ") |
| | | @TableField(exist = false) |
| | | private String materialCode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç§°") |
| | | @TableField(exist = false) |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty(value = "èµäº§æ¡å½¢ç ") |
| | | @TableField(exist = false) |
| | | private String materialQrcode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç") |
| | | @TableField(exist = false) |
| | | private String materialBrand; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åä½") |
| | | @TableField(exist = false) |
| | | private String materialUnitName; |
| | | |
| | | @ApiModelProperty(value = "èµäº§è§æ ¼åå·") |
| | | @TableField(exist = false) |
| | | private String materialAttr; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°") |
| | | @TableField(exist = false) |
| | | private String warehouseName; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * è¿ç»´çç¹ä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´çç¹ä¿¡æ¯è¡¨") |
| | | @TableName("`yw_stocktaking`") |
| | | public class YwStocktaking extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "ä½ç½®") |
| | | @ExcelColumn(name="ä½ç½®") |
| | | private String position; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0æªå¼å§ 1è¿è¡ä¸ 2已宿 3已忶", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0æªå¼å§ 1è¿è¡ä¸ 2已宿 3已忶") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "çç¹åç¼ç (å
³èsystem_user)") |
| | | @ExcelColumn(name="çç¹åç¼ç (å
³èsystem_user)") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | @ExcelColumn(name="åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "çç¹æ¶é´") |
| | | @ExcelColumn(name="çç¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date planDate; |
| | | |
| | | @ApiModelProperty(value = "ç¼å·") |
| | | @ExcelColumn(name="ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "ä»åºç¼ç (å
³èyw_warehouse)") |
| | | @ExcelColumn(name="ä»åºç¼ç (å
³èyw_warehouse)") |
| | | private Integer warehouseId; |
| | | |
| | | @ApiModelProperty(value = "å¼å§å¤ç人(å
³èsystem_user)", example = "1") |
| | | @ExcelColumn(name="å¼å§å¤ç人(å
³èsystem_user)") |
| | | private Integer dealUserId; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | @ExcelColumn(name="å¼å§æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date dealDate; |
| | | |
| | | @ApiModelProperty(value = "å¼å§å¤æ³¨") |
| | | @ExcelColumn(name="å¼å§å¤æ³¨") |
| | | private String dealInfo; |
| | | |
| | | @ApiModelProperty(value = "å·²çç¹ç©èµæ°é", example = "1") |
| | | @ExcelColumn(name="å·²çç¹ç©èµæ°é") |
| | | private Integer doneNum; |
| | | |
| | | @ApiModelProperty(value = "æªçç¹ç©èµæ°é", example = "1") |
| | | @ExcelColumn(name="æªçç¹ç©èµæ°é") |
| | | private Integer waitNum; |
| | | |
| | | @ApiModelProperty(value = "æ»ç©èµæ°é", example = "1") |
| | | @ExcelColumn(name="æ»ç©èµæ°é") |
| | | private Integer totalNum; |
| | | |
| | | @ApiModelProperty(value = "ççç©èµæ°é", example = "1") |
| | | @ExcelColumn(name="ççç©èµæ°é") |
| | | private Integer profitNum; |
| | | |
| | | @ApiModelProperty(value = "çäºç©èµæ°é", example = "1") |
| | | @ExcelColumn(name="çäºç©èµæ°é") |
| | | private Integer lossNum; |
| | | |
| | | @ApiModelProperty(value = "è´¦å®ç¸ç¬¦ç©èµæ°é", example = "1") |
| | | @ExcelColumn(name="è´¦å®ç¸ç¬¦ç©èµæ°é") |
| | | private Integer equalNum; |
| | | |
| | | @ApiModelProperty(value = "宿å¤ç人(å
³èsystem_user)", example = "1") |
| | | @ExcelColumn(name="宿å¤ç人(å
³èsystem_user)") |
| | | private Integer doneUserId; |
| | | |
| | | @ApiModelProperty(value = "宿æ¶é´") |
| | | @ExcelColumn(name="宿æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date doneDate; |
| | | |
| | | @ApiModelProperty(value = "宿夿³¨") |
| | | @ExcelColumn(name="宿夿³¨") |
| | | private String doneInfo; |
| | | |
| | | @ApiModelProperty(value = "åæ¶å¤ç人(å
³èsystem_user)", example = "1") |
| | | @ExcelColumn(name="åæ¶å¤ç人(å
³èsystem_user)") |
| | | private Integer cancelUserId; |
| | | |
| | | @ApiModelProperty(value = "åæ¶æ¶é´") |
| | | @ExcelColumn(name="åæ¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date cancelDate; |
| | | |
| | | @ApiModelProperty(value = "忶夿³¨") |
| | | @ExcelColumn(name="忶夿³¨") |
| | | private String cancelInfo; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°") |
| | | @TableField(exist = false) |
| | | private String warehouseName; |
| | | |
| | | @ApiModelProperty(value = "å建人åç§°") |
| | | @TableField(exist = false) |
| | | private String createName; |
| | | |
| | | @ApiModelProperty(value = "çç¹ååç§°") |
| | | @TableField(exist = false) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "å·²çè®°å½æ°") |
| | | @TableField(exist = false) |
| | | private Integer finishAmount; |
| | | |
| | | @ApiModelProperty(value = "æªçè®°å½æ°") |
| | | @TableField(exist = false) |
| | | private Integer unFinishAmount; |
| | | |
| | | @ApiModelProperty(value = "ççè®°å½æ°") |
| | | @TableField(exist = false) |
| | | private Integer profitAmount; |
| | | |
| | | @ApiModelProperty(value = "çäºè®°å½æ°") |
| | | @TableField(exist = false) |
| | | private Integer lossAmount; |
| | | |
| | | @ApiModelProperty(value = "ç¸ç¬¦è®°å½æ°") |
| | | @TableField(exist = false) |
| | | private Integer equalAmount; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * è¿ç»´çç¹æç»è®°å½è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´çç¹æç»è®°å½è¡¨") |
| | | @TableName("`yw_stocktaking_record`") |
| | | public class YwStocktakingRecord extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0æªå¼å§ 1å·²çç¹", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0æªå¼å§ 1å·²çç¹") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "çç¹åç¼ç (å
³èsystem_user)") |
| | | @ExcelColumn(name="çç¹åç¼ç (å
³èsystem_user)") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty(value = "çç¹æ¶é´") |
| | | @ExcelColumn(name="çç¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date planDate; |
| | | |
| | | @ApiModelProperty(value = "ç¼å·") |
| | | @ExcelColumn(name="ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "ç©èµç¼ç ï¼å
³èyw_material)", example = "1") |
| | | @ExcelColumn(name="ç©èµç¼ç ï¼å
³èyw_material)") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "è´¦é¢æ°é", example = "1") |
| | | @ExcelColumn(name="è´¦é¢æ°é") |
| | | private BigDecimal stock; |
| | | |
| | | @ApiModelProperty(value = "å®é
çç¹åºåé", example = "1") |
| | | @ExcelColumn(name="å®é
çç¹åºåé") |
| | | private BigDecimal actStock; |
| | | |
| | | @ApiModelProperty(value = "çç¹ 0è´¦å®ç¸ç¬¦ 1çäº 2çç", example = "1") |
| | | @ExcelColumn(name="çç¹ 0è´¦å®ç¸ç¬¦ 1çäº 2çç") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "çç¹è®¡åç¼ç (å
³èyw_stocktaking)", example = "1") |
| | | @ExcelColumn(name="çç¹è®¡åç¼ç (å
³èyw_stocktaking)") |
| | | private Integer stocktakingId; |
| | | |
| | | @ApiModelProperty(value = "èµäº§ç¼ç ") |
| | | @TableField(exist = false) |
| | | private String materialCode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç§°") |
| | | @TableField(exist = false) |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty(value = "èµäº§æ¡å½¢ç ") |
| | | @TableField(exist = false) |
| | | private String materialQrcode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç") |
| | | @TableField(exist = false) |
| | | private String materialBrand; |
| | | |
| | | @ApiModelProperty(value = "èµäº§è§æ ¼åå·") |
| | | @TableField(exist = false) |
| | | private String materialAttr; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åä½") |
| | | @TableField(exist = false) |
| | | private String materialUnitName; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°") |
| | | @TableField(exist = false) |
| | | private String warehouseName; |
| | | |
| | | @ApiModelProperty(value = "çç¹äººåç§°") |
| | | @TableField(exist = false) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "çç¹äººç»ç»åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * è¿ç»´ä»åºä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´ä»åºä¿¡æ¯è¡¨") |
| | | @TableName("`yw_warehouse`") |
| | | public class YwWarehouse extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | @ExcelColumn(name="åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ä½ç½®") |
| | | @ExcelColumn(name="ä½ç½®") |
| | | private String position; |
| | | |
| | | @ApiModelProperty(value = "ç¼å·") |
| | | @ExcelColumn(name="ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "è´è´£äººç¼ç (å
³èsystem_user)", example = "1") |
| | | @ExcelColumn(name="è´è´£äººç¼ç (å
³èsystem_user)") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | |
| | | @ApiModelProperty(value = "è´è´£äººåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String userName; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwMaterial; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´èµäº§ä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwMaterialService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywMaterial å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwMaterial ywMaterial); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywMaterial å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwMaterial ywMaterial); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywMaterial å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwMaterial ywMaterial); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywMaterials å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwMaterial> ywMaterials); |
| | | |
| | | void updateStatus(YwMaterial ywMaterials); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwMaterial |
| | | */ |
| | | YwMaterial findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywMaterial å®ä½å¯¹è±¡ |
| | | * @return YwMaterial |
| | | */ |
| | | YwMaterial findOne(YwMaterial ywMaterial); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywMaterial å®ä½å¯¹è±¡ |
| | | * @return List<YwMaterial> |
| | | */ |
| | | List<YwMaterial> findList(YwMaterial ywMaterial); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwMaterial> |
| | | */ |
| | | PageData<YwMaterial> findPage(PageWrap<YwMaterial> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywMaterial å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwMaterial ywMaterial); |
| | | |
| | | YwMaterial getDetail(Integer id); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwOutinboundRecord; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 14:28 |
| | | */ |
| | | public interface YwOutinboundRecordService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywOutinboundRecord å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwOutinboundRecord ywOutinboundRecord); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywOutinboundRecord å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwOutinboundRecord ywOutinboundRecord); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywOutinboundRecord å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwOutinboundRecord ywOutinboundRecord); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywOutinboundRecords å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwOutinboundRecord> ywOutinboundRecords); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwOutinboundRecord |
| | | */ |
| | | YwOutinboundRecord findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywOutinboundRecord å®ä½å¯¹è±¡ |
| | | * @return YwOutinboundRecord |
| | | */ |
| | | YwOutinboundRecord findOne(YwOutinboundRecord ywOutinboundRecord); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywOutinboundRecord å®ä½å¯¹è±¡ |
| | | * @return List<YwOutinboundRecord> |
| | | */ |
| | | List<YwOutinboundRecord> findList(YwOutinboundRecord ywOutinboundRecord); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwOutinboundRecord> |
| | | */ |
| | | PageData<YwOutinboundRecord> findPage(PageWrap<YwOutinboundRecord> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywOutinboundRecord å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwOutinboundRecord ywOutinboundRecord); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwOutinbound; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´åºå
¥åºä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwOutinboundService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywOutinbound å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwOutinbound ywOutinbound); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywOutinbound å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwOutinbound ywOutinbound); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywOutinbound å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwOutinbound ywOutinbound); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywOutinbounds å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwOutinbound> ywOutinbounds); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwOutinbound |
| | | */ |
| | | YwOutinbound findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywOutinbound å®ä½å¯¹è±¡ |
| | | * @return YwOutinbound |
| | | */ |
| | | YwOutinbound findOne(YwOutinbound ywOutinbound); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywOutinbound å®ä½å¯¹è±¡ |
| | | * @return List<YwOutinbound> |
| | | */ |
| | | List<YwOutinbound> findList(YwOutinbound ywOutinbound); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwOutinbound> |
| | | */ |
| | | PageData<YwOutinbound> findPage(PageWrap<YwOutinbound> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywOutinbound å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwOutinbound ywOutinbound); |
| | | |
| | | YwOutinbound getDetail(Integer id); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwProblem; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwProblemService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywProblem å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwProblem ywProblem); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywProblem å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwProblem ywProblem); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywProblem å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwProblem ywProblem); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywProblems å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwProblem> ywProblems); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwProblem |
| | | */ |
| | | YwProblem findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywProblem å®ä½å¯¹è±¡ |
| | | * @return YwProblem |
| | | */ |
| | | YwProblem findOne(YwProblem ywProblem); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywProblem å®ä½å¯¹è±¡ |
| | | * @return List<YwProblem> |
| | | */ |
| | | List<YwProblem> findList(YwProblem ywProblem); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwProblem> |
| | | */ |
| | | PageData<YwProblem> findPage(PageWrap<YwProblem> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywProblem å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwProblem ywProblem); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwStock; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´åºåä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwStockService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywStock å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwStock ywStock); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywStock å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwStock ywStock); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywStock å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwStock ywStock); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywStocks å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwStock> ywStocks); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwStock |
| | | */ |
| | | YwStock findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywStock å®ä½å¯¹è±¡ |
| | | * @return YwStock |
| | | */ |
| | | YwStock findOne(YwStock ywStock); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywStock å®ä½å¯¹è±¡ |
| | | * @return List<YwStock> |
| | | */ |
| | | List<YwStock> findList(YwStock ywStock); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwStock> |
| | | */ |
| | | PageData<YwStock> findPage(PageWrap<YwStock> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywStock å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwStock ywStock); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwStocktakingRecord; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´çç¹æç»è®°å½è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwStocktakingRecordService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywStocktakingRecord å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwStocktakingRecord ywStocktakingRecord); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywStocktakingRecord å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwStocktakingRecord ywStocktakingRecord); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywStocktakingRecord å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwStocktakingRecord ywStocktakingRecord); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywStocktakingRecords å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwStocktakingRecord> ywStocktakingRecords); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwStocktakingRecord |
| | | */ |
| | | YwStocktakingRecord findById(Integer id); |
| | | |
| | | YwStocktakingRecord getDetail(Integer id); |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywStocktakingRecord å®ä½å¯¹è±¡ |
| | | * @return YwStocktakingRecord |
| | | */ |
| | | YwStocktakingRecord findOne(YwStocktakingRecord ywStocktakingRecord); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywStocktakingRecord å®ä½å¯¹è±¡ |
| | | * @return List<YwStocktakingRecord> |
| | | */ |
| | | List<YwStocktakingRecord> findList(YwStocktakingRecord ywStocktakingRecord); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwStocktakingRecord> |
| | | */ |
| | | PageData<YwStocktakingRecord> findPage(PageWrap<YwStocktakingRecord> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywStocktakingRecord å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwStocktakingRecord ywStocktakingRecord); |
| | | |
| | | void takingData(YwStocktakingRecord ywStocktakingRecord); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwStocktaking; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´çç¹ä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwStocktakingService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywStocktaking å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwStocktaking ywStocktaking); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id, LoginUserInfo loginUserInfo); |
| | | |
| | | void cancelById(Integer id, LoginUserInfo loginUserInfo); |
| | | |
| | | void beginById(Integer id, LoginUserInfo loginUserInfo); |
| | | |
| | | void finishById(Integer id, LoginUserInfo loginUserInfo); |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywStocktaking å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwStocktaking ywStocktaking); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywStocktaking å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwStocktaking ywStocktaking); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywStocktakings å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwStocktaking> ywStocktakings); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwStocktaking |
| | | */ |
| | | YwStocktaking findById(Integer id); |
| | | |
| | | YwStocktaking getDetail(Integer id); |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywStocktaking å®ä½å¯¹è±¡ |
| | | * @return YwStocktaking |
| | | */ |
| | | YwStocktaking findOne(YwStocktaking ywStocktaking); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywStocktaking å®ä½å¯¹è±¡ |
| | | * @return List<YwStocktaking> |
| | | */ |
| | | List<YwStocktaking> findList(YwStocktaking ywStocktaking); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwStocktaking> |
| | | */ |
| | | PageData<YwStocktaking> findPage(PageWrap<YwStocktaking> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywStocktaking å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwStocktaking ywStocktaking); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwWarehouse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´ä»åºä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwWarehouseService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywWarehouse å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwWarehouse ywWarehouse); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id, LoginUserInfo loginUserInfo); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywWarehouse å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwWarehouse ywWarehouse); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywWarehouse å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwWarehouse ywWarehouse); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywWarehouses å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwWarehouse> ywWarehouses); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwWarehouse |
| | | */ |
| | | YwWarehouse findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywWarehouse å®ä½å¯¹è±¡ |
| | | * @return YwWarehouse |
| | | */ |
| | | YwWarehouse findOne(YwWarehouse ywWarehouse); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywWarehouse å®ä½å¯¹è±¡ |
| | | * @return List<YwWarehouse> |
| | | */ |
| | | List<YwWarehouse> findList(YwWarehouse ywWarehouse); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwWarehouse> |
| | | */ |
| | | PageData<YwWarehouse> findPage(PageWrap<YwWarehouse> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywWarehouse å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwWarehouse ywWarehouse); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwMaterialMapper; |
| | | import com.doumee.dao.business.YwOutinboundMapper; |
| | | import com.doumee.dao.business.YwOutinboundRecordMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.service.business.YwMaterialService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * è¿ç»´èµäº§ä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Service |
| | | public class YwMaterialServiceImpl implements YwMaterialService { |
| | | |
| | | @Autowired |
| | | private YwMaterialMapper ywMaterialMapper; |
| | | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Autowired |
| | | private YwOutinboundRecordMapper ywOutinboundRecordMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer create(YwMaterial ywMaterial) { |
| | | //TODO rk æå±é¡¹ç®/æ¿é´éæ±é®é¢ |
| | | if(Objects.isNull(ywMaterial) |
| | | || StringUtils.isBlank(ywMaterial.getName()) |
| | | || StringUtils.isBlank(ywMaterial.getCode()) |
| | | || StringUtils.isBlank(ywMaterial.getQrcode()) |
| | | || Objects.isNull(ywMaterial.getCateId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | ywMaterial.setId(null); |
| | | if(StringUtils.isBlank(ywMaterial.getCode())){ |
| | | //èªå¨çæ TODO åå¨é®é¢ |
| | | Long countCode = ywMaterialMapper.selectCount(new QueryWrapper<YwMaterial>().lambda().eq(YwMaterial::getAutoCode, Constants.ONE)); |
| | | String nextCode = StringUtils.leftPad(Long.toString(countCode + 1),4,"0"); |
| | | ywMaterial.setCode("P"+nextCode); |
| | | ywMaterial.setAutoCode(Constants.ONE); |
| | | }else{ |
| | | //éªè¯codeæ¯å¦åå¨ |
| | | if(ywMaterialMapper.selectCount(new QueryWrapper<YwMaterial>().lambda().eq(YwMaterial::getCode, ywMaterial.getCode()))>0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åç¼ç å·²åå¨"); |
| | | }; |
| | | ywMaterial.setAutoCode(Constants.ZERO); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywMaterial.getLoginUserInfo(); |
| | | ywMaterial.setCreator(loginUserInfo.getId()); |
| | | ywMaterial.setCreateDate(new Date()); |
| | | ywMaterial.setIsdeleted(Constants.ZERO); |
| | | ywMaterial.setStatus(Constants.ZERO); |
| | | ywMaterialMapper.insert(ywMaterial); |
| | | |
| | | if(Objects.nonNull(ywMaterial.getMultifile())){ |
| | | if(org.apache.commons.lang3.StringUtils.isBlank(ywMaterial.getMultifile().getFileurl()) |
| | | || org.apache.commons.lang3.StringUtils.isBlank(ywMaterial.getMultifile().getName())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"éä»¶ä¿¡æ¯é误"); |
| | | } |
| | | ywMaterial.getMultifile().setCreator(loginUserInfo.getId()); |
| | | ywMaterial.getMultifile().setCreateDate(new Date()); |
| | | ywMaterial.getMultifile().setIsdeleted(Constants.ZERO); |
| | | ywMaterial.getMultifile().setObjType(Constants.MultiFile.MATERIAL_FILE.getKey()); |
| | | ywMaterial.getMultifile().setObjId(ywMaterial.getId()); |
| | | multifileMapper.insert(ywMaterial.getMultifile()); |
| | | } |
| | | return ywMaterial.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | if(ywOutinboundRecordMapper.selectCount(new QueryWrapper<YwOutinboundRecord>().lambda().eq(YwOutinboundRecord::getMaterialId,id))>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åèµäº§å·²æåºå
¥åºè®°å½ï¼ä¸å¯å é¤"); |
| | | } |
| | | ywMaterialMapper.update(new UpdateWrapper<YwMaterial>().lambda().set(YwMaterial::getIsdeleted,Constants.ONE).eq(YwMaterial::getId,id)); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwMaterial ywMaterial) { |
| | | UpdateWrapper<YwMaterial> deleteWrapper = new UpdateWrapper<>(ywMaterial); |
| | | ywMaterialMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywMaterialMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void updateById(YwMaterial ywMaterial) { |
| | | //TODO rk æå±é¡¹ç®/æ¿é´éæ±é®é¢ |
| | | if(Objects.isNull(ywMaterial) |
| | | || StringUtils.isBlank(ywMaterial.getName()) |
| | | || StringUtils.isBlank(ywMaterial.getCode()) |
| | | || StringUtils.isBlank(ywMaterial.getQrcode()) |
| | | || Objects.isNull(ywMaterial.getCateId()) |
| | | || Objects.isNull(ywMaterial.getId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | ywMaterial.setCode(null); |
| | | LoginUserInfo loginUserInfo = ywMaterial.getLoginUserInfo(); |
| | | ywMaterial.setEditor(loginUserInfo.getId()); |
| | | ywMaterial.setEditDate(new Date()); |
| | | ywMaterialMapper.updateById(ywMaterial); |
| | | multifileMapper.delete(new QueryWrapper<Multifile>().lambda().eq(Multifile::getObjType,Constants.MultiFile.MATERIAL_FILE.getKey()).eq(Multifile::getObjId,ywMaterial.getId())); |
| | | if(Objects.nonNull(ywMaterial.getMultifile())){ |
| | | if(org.apache.commons.lang3.StringUtils.isBlank(ywMaterial.getMultifile().getFileurl()) |
| | | || org.apache.commons.lang3.StringUtils.isBlank(ywMaterial.getMultifile().getName())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"éä»¶ä¿¡æ¯é误"); |
| | | } |
| | | ywMaterial.getMultifile().setCreator(loginUserInfo.getId()); |
| | | ywMaterial.getMultifile().setCreateDate(new Date()); |
| | | ywMaterial.getMultifile().setIsdeleted(Constants.ZERO); |
| | | ywMaterial.getMultifile().setObjType(Constants.MultiFile.MATERIAL_FILE.getKey()); |
| | | ywMaterial.getMultifile().setObjId(ywMaterial.getId()); |
| | | multifileMapper.insert(ywMaterial.getMultifile()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwMaterial> ywMaterials) { |
| | | if (CollectionUtils.isEmpty(ywMaterials)) { |
| | | return; |
| | | } |
| | | for (YwMaterial ywMaterial: ywMaterials) { |
| | | this.updateById(ywMaterial); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateStatus(YwMaterial ywMaterials) { |
| | | if(Objects.isNull(ywMaterials) |
| | | || Objects.isNull(ywMaterials.getId()) |
| | | || Objects.isNull(ywMaterials.getStatus())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | ywMaterialMapper.update(new UpdateWrapper<YwMaterial>().lambda().eq(YwMaterial::getId,ywMaterials.getId()).set(YwMaterial::getStatus,ywMaterials.getStatus())); |
| | | } |
| | | |
| | | @Override |
| | | public YwMaterial findById(Integer id) { |
| | | return ywMaterialMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwMaterial getDetail(Integer id) { |
| | | YwMaterial ywMaterial = ywMaterialMapper.selectById(id); |
| | | if(Objects.isNull(ywMaterial)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | Multifile multifile = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda().eq(Multifile::getObjId,id).eq(Multifile::getObjType,Constants.MultiFile.MATERIAL_FILE.getKey())); |
| | | if(Objects.nonNull(multifile)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_CONTRACT_BILL).getCode(); |
| | | multifile.setFileurlFull(path + multifile.getFileurl()); |
| | | ywMaterial.setMultifile(multifile); |
| | | } |
| | | return ywMaterial; |
| | | } |
| | | |
| | | @Override |
| | | public YwMaterial findOne(YwMaterial ywMaterial) { |
| | | QueryWrapper<YwMaterial> wrapper = new QueryWrapper<>(ywMaterial); |
| | | return ywMaterialMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwMaterial> findList(YwMaterial ywMaterial) { |
| | | QueryWrapper<YwMaterial> wrapper = new QueryWrapper<>(ywMaterial); |
| | | return ywMaterialMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwMaterial> findPage(PageWrap<YwMaterial> pageWrap) { |
| | | IPage<YwMaterial> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwMaterial> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwMaterial model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwMaterial.class) |
| | | .leftJoin(YwRoom.class,YwRoom::getId,YwMaterial::getRoomId) |
| | | .and(StringUtils.isNotBlank(model.getCode()),i->i.like(YwMaterial::getCode,model.getCode()).or().like(YwMaterial::getName,model.getCode())) |
| | | .like(StringUtils.isNotBlank(model.getAttr()),YwMaterial::getAttr,model.getAttr()) |
| | | .eq(Objects.nonNull(model.getProjectId()),YwRoom::getProjectId,model.getProjectId()) |
| | | .eq(Objects.nonNull(model.getRoomId()),YwMaterial::getRoomId,model.getRoomId()) |
| | | .eq(YwMaterial::getIsdeleted,Constants.ZERO) |
| | | .orderByAsc(YwMaterial::getCode) |
| | | ; |
| | | |
| | | IPage iPage = ywMaterialMapper.selectJoinPage(page,YwMaterial.class,queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public long count(YwMaterial ywMaterial) { |
| | | QueryWrapper<YwMaterial> wrapper = new QueryWrapper<>(ywMaterial); |
| | | return ywMaterialMapper.selectCount(wrapper); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwOutinboundRecordMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwOutinboundRecordService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * è¿ç»´åºå
¥åºä¿¡æ¯æç»è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 14:28 |
| | | */ |
| | | @Service |
| | | public class YwOutinboundRecordServiceImpl implements YwOutinboundRecordService { |
| | | |
| | | @Autowired |
| | | private YwOutinboundRecordMapper ywOutinboundRecordMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwOutinboundRecord ywOutinboundRecord) { |
| | | ywOutinboundRecordMapper.insert(ywOutinboundRecord); |
| | | return ywOutinboundRecord.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ywOutinboundRecordMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwOutinboundRecord ywOutinboundRecord) { |
| | | UpdateWrapper<YwOutinboundRecord> deleteWrapper = new UpdateWrapper<>(ywOutinboundRecord); |
| | | ywOutinboundRecordMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywOutinboundRecordMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwOutinboundRecord ywOutinboundRecord) { |
| | | ywOutinboundRecordMapper.updateById(ywOutinboundRecord); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwOutinboundRecord> ywOutinboundRecords) { |
| | | if (CollectionUtils.isEmpty(ywOutinboundRecords)) { |
| | | return; |
| | | } |
| | | for (YwOutinboundRecord ywOutinboundRecord: ywOutinboundRecords) { |
| | | this.updateById(ywOutinboundRecord); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwOutinboundRecord findById(Integer id) { |
| | | return ywOutinboundRecordMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwOutinboundRecord findOne(YwOutinboundRecord ywOutinboundRecord) { |
| | | QueryWrapper<YwOutinboundRecord> wrapper = new QueryWrapper<>(ywOutinboundRecord); |
| | | return ywOutinboundRecordMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwOutinboundRecord> findList(YwOutinboundRecord ywOutinboundRecord) { |
| | | QueryWrapper<YwOutinboundRecord> wrapper = new QueryWrapper<>(ywOutinboundRecord); |
| | | return ywOutinboundRecordMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwOutinboundRecord> findPage(PageWrap<YwOutinboundRecord> pageWrap) { |
| | | IPage<YwOutinboundRecord> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwOutinboundRecord> queryWrapper = new MPJLambdaWrapper<YwOutinboundRecord>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwOutinboundRecord model = pageWrap.getModel(); |
| | | if(Objects.isNull(model)||Objects.isNull(model.getInOut())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | List<Integer> typeList = Constants.ywOutInType.getAllTypeKey(model.getInOut()); |
| | | queryWrapper.selectAll(YwOutinboundRecord.class) |
| | | .selectAs(SystemUser::getRealname,YwOutinboundRecord::getCreateUserName) |
| | | .selectAs(YwOutinbound::getCode,YwOutinboundRecord::getCode) |
| | | .selectAs(YwWarehouse::getName,YwOutinboundRecord::getWarehouseName) |
| | | .selectAs(YwMaterial::getCode,YwOutinboundRecord::getMaterialCode) |
| | | .selectAs(YwMaterial::getName,YwOutinboundRecord::getMaterialName) |
| | | .selectAs(YwMaterial::getQrcode,YwOutinboundRecord::getMaterialQrcode) |
| | | .selectAs(YwMaterial::getBrand,YwOutinboundRecord::getMaterialBrand) |
| | | .selectAs(YwMaterial::getUnitName,YwOutinboundRecord::getMaterialUnitName) |
| | | .select(" c.name ",YwOutinboundRecord::getCategoryParentName) |
| | | .select(" c1.name ",YwOutinboundRecord::getCategoryName) |
| | | .leftJoin(YwOutinbound.class,YwOutinbound::getId,YwOutinboundRecord::getOutInBoundId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwOutinbound::getCreator) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwOutinbound::getWarehouseId) |
| | | .leftJoin(YwMaterial.class,YwMaterial::getId,YwOutinboundRecord::getMaterialId) |
| | | .leftJoin("category c on t4.PARENT_CATE_ID = c.id") |
| | | .leftJoin("category c1 on t4.CATE_ID = c1.id") |
| | | .like(StringUtils.isNotBlank(model.getCode()),YwOutinbound::getCode,model.getCode()) |
| | | .like(StringUtils.isNotBlank(model.getMaterialCode()),YwMaterial::getCode,model.getMaterialCode()) |
| | | .eq(Objects.nonNull(model.getWarehouseId()),YwOutinbound::getWarehouseId,model.getWarehouseId()) |
| | | .in(Objects.nonNull(model.getInOut()),YwOutinbound::getType,typeList) |
| | | .ge(StringUtils.isNotBlank(model.getDoneDateStart()),YwOutinbound::getDoneDate,model.getDoneDateStart()+" 00:00:00") |
| | | .le(StringUtils.isNotBlank(model.getDoneDateEnd()),YwOutinbound::getDoneDate,model.getDoneDateEnd()+" 23:59:59") |
| | | .ge(StringUtils.isNotBlank(model.getCreateDateStart()),YwOutinbound::getCreateDate,model.getCreateDateStart()+" 00:00:00") |
| | | .le(StringUtils.isNotBlank(model.getCreateDateEnd()),YwOutinbound::getCreateDate,model.getCreateDateEnd()+" 23:59:59") |
| | | .orderByDesc(YwOutinbound::getCreateDate) |
| | | ; |
| | | IPage iPage = ywOutinboundRecordMapper.selectJoinPage(page,YwOutinboundRecord.class,queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public long count(YwOutinboundRecord ywOutinboundRecord) { |
| | | QueryWrapper<YwOutinboundRecord> wrapper = new QueryWrapper<>(ywOutinboundRecord); |
| | | return ywOutinboundRecordMapper.selectCount(wrapper); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.druid.sql.visitor.functions.Concat; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.utils.redis.RedisUtil; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwOutinboundService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * è¿ç»´åºå
¥åºä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Service |
| | | public class YwOutinboundServiceImpl implements YwOutinboundService { |
| | | |
| | | @Autowired |
| | | private YwOutinboundMapper ywOutinboundMapper; |
| | | |
| | | @Autowired |
| | | private YwMaterialMapper ywMaterialMapper; |
| | | |
| | | @Autowired |
| | | private YwOutinboundRecordMapper ywOutinboundRecordMapper; |
| | | |
| | | @Autowired |
| | | private YwStockMapper ywStockMapper; |
| | | |
| | | @Autowired |
| | | private YwWarehouseMapper ywWarehouseMapper; |
| | | |
| | | @Autowired |
| | | private YwStocktakingMapper ywStocktakingMapper; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class, BusinessException.class}) |
| | | public Integer create(YwOutinbound ywOutinbound) { |
| | | List<YwOutinboundRecord> recordList = this.verifyData(ywOutinbound); |
| | | YwWarehouse ywWarehouse = ywWarehouseMapper.selectById(ywOutinbound.getWarehouseId()); |
| | | if(Objects.isNull(ywWarehouse)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ä»åºä¿¡æ¯"); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywOutinbound.getLoginUserInfo(); |
| | | //æ ¹æ®æä½ç±»åè¿è¡å¤ææ¯å
¥åº/åºåº |
| | | Constants.ywOutInType ywOutInType = Constants.ywOutInType.getYwOutInType(ywOutinbound.getType()); |
| | | if(Objects.isNull(ywOutInType)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªå¹é
å°åºå
¥åºç±»å"); |
| | | } |
| | | //çæåºå
¥åºåæ®ç¼å· |
| | | ywOutinbound.setCode(getNextInOutCode(ywOutInType.getInOut())); |
| | | ywOutinbound.setCreator(loginUserInfo.getId()); |
| | | ywOutinbound.setCreateDate(new Date()); |
| | | ywOutinbound.setOrigin(Constants.ZERO); |
| | | ywOutinboundMapper.insert(ywOutinbound); |
| | | for (YwOutinboundRecord ywOutinboundRecord:recordList) { |
| | | ywOutinboundRecord.setCreator(loginUserInfo.getId()); |
| | | ywOutinboundRecord.setCreateDate(new Date()); |
| | | ywOutinboundRecord.setIsdeleted(Constants.ZERO); |
| | | } |
| | | ywOutinboundRecordMapper.insert(recordList); |
| | | //æ´æ°åºåä¿¡æ¯ |
| | | this.dealStockData(ywOutinbound,recordList,ywOutInType.getInOut()); |
| | | return ywOutinbound.getId(); |
| | | } |
| | | |
| | | |
| | | public List<YwOutinboundRecord> verifyData(YwOutinbound ywOutinbound){ |
| | | if(Objects.isNull(ywOutinbound) |
| | | || Objects.isNull(ywOutinbound.getType()) |
| | | || (Objects.nonNull(ywOutinbound.getType()) && (!(ywOutinbound.getType() == Constants.ZERO || ywOutinbound.getType() == Constants.ONE))) |
| | | || Objects.isNull(ywOutinbound.getWarehouseId()) |
| | | || Objects.isNull(ywOutinbound.getDoneDate()) |
| | | || com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywOutinbound.getRecordList()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | List<YwOutinboundRecord> recordList = ywOutinbound.getRecordList(); |
| | | for (YwOutinboundRecord ywOutinboundRecord:recordList) { |
| | | if(Objects.isNull(ywOutinboundRecord) |
| | | ||Objects.isNull(ywOutinboundRecord.getMaterialId()) |
| | | ||Objects.isNull(ywOutinboundRecord.getStock()) |
| | | ||ywOutinboundRecord.getStock().compareTo(BigDecimal.ZERO)<=Constants.ZERO |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | } |
| | | //夿å½åæ¯å¦åå¨è¿è¡ä¸ççç¹å |
| | | if(ywStocktakingMapper.selectCount(new QueryWrapper<YwStocktaking>().lambda().eq(YwStocktaking::getIsdeleted,Constants.ZERO) |
| | | .eq(YwStocktaking::getWarehouseId,ywOutinbound.getWarehouseId()) |
| | | .eq(YwStocktaking::getStatus,Constants.ONE))>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åå¨è¿è¡ä¸ççç¹åï¼æ æ³è¿è¡åºå
¥åºæä½"); |
| | | }; |
| | | //夿æ¯å¦åå¨ç¸åæ°æ® |
| | | Set<Integer> materialIds = new HashSet<Integer>(recordList.stream().map(i->i.getMaterialId()).collect(Collectors.toList())); |
| | | if(materialIds.size() != recordList.size()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åå¨ç¸åèµäº§ä¿¡æ¯ï¼è¯·æ£æ¥æ°æ®ï¼"); |
| | | } |
| | | if(ywMaterialMapper.selectCount(new QueryWrapper<YwMaterial>().lambda().in(YwMaterial::getId,materialIds))!=recordList.size()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"èµäº§ä¿¡æ¯åå¨å¼å¸¸ï¼è¯·æ£æ¥æ°æ®ï¼"); |
| | | } |
| | | return recordList; |
| | | } |
| | | |
| | | public void dealStockData(YwOutinbound ywOutinbound,List<YwOutinboundRecord> recordList,Integer inOut){ |
| | | for (YwOutinboundRecord ywOutinboundRecord:recordList) { |
| | | YwStock ywStock = ywStockMapper.selectOne(new QueryWrapper<YwStock>().lambda().eq(YwStock::getIsdeleted,Constants.ZERO).eq(YwStock::getWarehouseId,ywOutinbound.getWarehouseId()).eq(YwStock::getMaterialId,ywOutinboundRecord.getMaterialId())); |
| | | if(Constants.equalsInteger(inOut,Constants.ZERO)){ |
| | | //å
¥åº |
| | | if(Objects.isNull(ywStock)){ |
| | | ywStock.setStock(ywOutinboundRecord.getStock()); |
| | | ywStock.setWarehouseId(ywOutinbound.getWarehouseId()); |
| | | ywStock.setMaterialId(ywOutinboundRecord.getMaterialId()); |
| | | ywStock.setCreateDate(new Date()); |
| | | ywStock.setCreator(ywOutinbound.getCreator()); |
| | | ywStockMapper.insert(ywStock); |
| | | }else{ |
| | | ywStockMapper.update(new UpdateWrapper<YwStock>().lambda() |
| | | .set(YwStock::getStock," ( stock + " + ywStock.getStock() + " )") |
| | | .set(YwStock::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwStock::getEditor, ywOutinbound.getCreator()) |
| | | .eq(YwStock::getId,ywStock.getId()) |
| | | ); |
| | | } |
| | | }else{ |
| | | YwMaterial ywMaterial = ywMaterialMapper.selectById(ywOutinboundRecord.getMaterialId()); |
| | | //åºåº |
| | | if(Objects.isNull(ywStock) || ywStock.getStock().compareTo(ywOutinboundRecord.getStock()) < Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), ywMaterial.getName() + "åºåä¸è¶³ï¼è¯·å·æ°éè¯"); |
| | | }else if(ywStock.getStock().compareTo(ywOutinboundRecord.getStock()) == Constants.ZERO){ |
| | | ywStockMapper.deleteById(ywStock.getId()); |
| | | }else{ |
| | | ywStockMapper.update(new UpdateWrapper<YwStock>().lambda() |
| | | .set(YwStock::getStock," ( stock - " + ywStock.getStock() + " )") |
| | | .set(YwStock::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwStock::getEditor, ywOutinbound.getCreator()) |
| | | .eq(YwStock::getId,ywStock.getId()) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ywOutinboundMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwOutinbound ywOutinbound) { |
| | | UpdateWrapper<YwOutinbound> deleteWrapper = new UpdateWrapper<>(ywOutinbound); |
| | | ywOutinboundMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywOutinboundMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwOutinbound ywOutinbound) { |
| | | ywOutinboundMapper.updateById(ywOutinbound); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwOutinbound> ywOutinbounds) { |
| | | if (CollectionUtils.isEmpty(ywOutinbounds)) { |
| | | return; |
| | | } |
| | | for (YwOutinbound ywOutinbound: ywOutinbounds) { |
| | | this.updateById(ywOutinbound); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwOutinbound findById(Integer id) { |
| | | return ywOutinboundMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwOutinbound findOne(YwOutinbound ywOutinbound) { |
| | | QueryWrapper<YwOutinbound> wrapper = new QueryWrapper<>(ywOutinbound); |
| | | return ywOutinboundMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwOutinbound> findList(YwOutinbound ywOutinbound) { |
| | | QueryWrapper<YwOutinbound> wrapper = new QueryWrapper<>(ywOutinbound); |
| | | return ywOutinboundMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public YwOutinbound getDetail(Integer id) { |
| | | MPJLambdaWrapper<YwOutinbound> queryWrapper = new MPJLambdaWrapper<YwOutinbound>(); |
| | | queryWrapper.selectAll(YwOutinbound.class) |
| | | .selectAs(SystemUser::getRealname,YwOutinbound::getCreateUserName) |
| | | .selectAs(YwWarehouse::getName,YwOutinbound::getWarehouseName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwOutinbound::getCreator) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwOutinbound::getWarehouseId) |
| | | .eq(YwOutinbound::getId,id) |
| | | .last(" limit 1"); |
| | | YwOutinbound ywOutinbound = ywOutinboundMapper.selectJoinOne(YwOutinbound.class,queryWrapper); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | idList.add(id); |
| | | ywOutinbound.setRecordList(this.getRecordDetailData(idList)); |
| | | return ywOutinbound; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PageData<YwOutinbound> findPage(PageWrap<YwOutinbound> pageWrap) { |
| | | IPage<YwOutinbound> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwOutinbound> queryWrapper = new MPJLambdaWrapper<YwOutinbound>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwOutinbound model = pageWrap.getModel(); |
| | | if(Objects.isNull(model)||Objects.isNull(model.getInOut())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | List<Integer> typeList = Constants.ywOutInType.getAllTypeKey(model.getInOut()); |
| | | queryWrapper.selectAll(YwOutinbound.class) |
| | | .selectAs(SystemUser::getRealname,YwOutinbound::getCreateUserName) |
| | | .selectAs(YwWarehouse::getName,YwOutinbound::getWarehouseName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwOutinbound::getCreator) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwOutinbound::getWarehouseId) |
| | | .like(StringUtils.isNotBlank(model.getCode()),YwOutinbound::getCode,model.getCode()) |
| | | .eq(Objects.nonNull(model.getType()),YwOutinbound::getType,model.getType()) |
| | | .eq(Objects.nonNull(model.getWarehouseId()),YwOutinbound::getWarehouseId,model.getWarehouseId()) |
| | | .in(Objects.nonNull(model.getInOut()),YwOutinbound::getType,typeList) |
| | | ; |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | IPage iPage = ywOutinboundMapper.selectJoinPage(page,YwOutinbound.class,queryWrapper); |
| | | if(Objects.nonNull(iPage.getRecords())){ |
| | | iPage.setRecords(this.getDetailData(iPage.getRecords())); |
| | | } |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | public List<YwOutinbound> getDetailData(List<YwOutinbound> ywOutinboundList){ |
| | | List<Integer> idList = ywOutinboundList.stream().map(i->i.getId()).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(idList)){ |
| | | List<YwOutinboundRecord> ywOutinboundRecordList = this.getRecordDetailData(idList); |
| | | if(CollectionUtils.isEmpty(ywOutinboundRecordList)){ |
| | | return ywOutinboundList; |
| | | } |
| | | for (YwOutinbound ywOutinbound:ywOutinboundList) { |
| | | ywOutinbound.setRecordList( |
| | | ywOutinboundRecordList.stream().filter(i->Constants.equalsInteger(i.getOutInBoundId(),ywOutinbound.getId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | } |
| | | return ywOutinboundList; |
| | | } |
| | | |
| | | |
| | | public List<YwOutinboundRecord> getRecordDetailData(List<Integer> outinBoundIdList){ |
| | | List<YwOutinboundRecord> ywOutinboundRecordList = ywOutinboundRecordMapper.selectJoinList(YwOutinboundRecord.class, |
| | | new MPJLambdaWrapper<YwOutinboundRecord>() |
| | | .selectAll(YwOutinboundRecord.class) |
| | | .selectAs(YwMaterial::getCode,YwOutinboundRecord::getMaterialCode) |
| | | .selectAs(YwMaterial::getName,YwOutinboundRecord::getMaterialName) |
| | | .selectAs(YwMaterial::getQrcode,YwOutinboundRecord::getMaterialQrcode) |
| | | .selectAs(YwMaterial::getBrand,YwOutinboundRecord::getMaterialBrand) |
| | | .selectAs(YwMaterial::getUnitName,YwOutinboundRecord::getMaterialUnitName) |
| | | .leftJoin(YwMaterial.class,YwMaterial::getId,YwOutinboundRecord::getMaterialId) |
| | | .eq(YwOutinboundRecord::getIsdeleted,Constants.ZERO) |
| | | .in(YwOutinboundRecord::getOutInBoundId,outinBoundIdList) |
| | | ); |
| | | return ywOutinboundRecordList; |
| | | } |
| | | |
| | | |
| | | // @Override |
| | | // public PageData<YwOutinbound> findPage(PageWrap<YwOutinbound> pageWrap) { |
| | | // IPage<YwOutinbound> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | // |
| | | // QueryWrapper<YwOutinbound> queryWrapper = new QueryWrapper<>(); |
| | | // Utils.MP.blankToNull(pageWrap.getModel()); |
| | | // if (pageWrap.getModel().getId() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getId, pageWrap.getModel().getId()); |
| | | // } |
| | | // if (pageWrap.getModel().getCreator() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getCreator, pageWrap.getModel().getCreator()); |
| | | // } |
| | | // if (pageWrap.getModel().getCreateDate() != null) { |
| | | // queryWrapper.lambda().ge(YwOutinbound::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | // queryWrapper.lambda().le(YwOutinbound::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | // } |
| | | // if (pageWrap.getModel().getEditor() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getEditor, pageWrap.getModel().getEditor()); |
| | | // } |
| | | // if (pageWrap.getModel().getEditDate() != null) { |
| | | // queryWrapper.lambda().ge(YwOutinbound::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | // queryWrapper.lambda().le(YwOutinbound::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | // } |
| | | // if (pageWrap.getModel().getIsdeleted() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | // } |
| | | // if (pageWrap.getModel().getRemark() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getRemark, pageWrap.getModel().getRemark()); |
| | | // } |
| | | // if (pageWrap.getModel().getWarehouseId() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getWarehouseId, pageWrap.getModel().getWarehouseId()); |
| | | // } |
| | | // if (pageWrap.getModel().getMaterialId() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getMaterialId, pageWrap.getModel().getMaterialId()); |
| | | // } |
| | | // if (pageWrap.getModel().getStock() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getStock, pageWrap.getModel().getStock()); |
| | | // } |
| | | // if (pageWrap.getModel().getType() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getType, pageWrap.getModel().getType()); |
| | | // } |
| | | // if (pageWrap.getModel().getOrigin() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getOrigin, pageWrap.getModel().getOrigin()); |
| | | // } |
| | | // if (pageWrap.getModel().getContent() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getContent, pageWrap.getModel().getContent()); |
| | | // } |
| | | // if (pageWrap.getModel().getDoneDate() != null) { |
| | | // queryWrapper.lambda().ge(YwOutinbound::getDoneDate, Utils.Date.getStart(pageWrap.getModel().getDoneDate())); |
| | | // queryWrapper.lambda().le(YwOutinbound::getDoneDate, Utils.Date.getEnd(pageWrap.getModel().getDoneDate())); |
| | | // } |
| | | // if (pageWrap.getModel().getStatus() != null) { |
| | | // queryWrapper.lambda().eq(YwOutinbound::getStatus, pageWrap.getModel().getStatus()); |
| | | // } |
| | | // for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | // if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | // queryWrapper.orderByDesc(sortData.getProperty()); |
| | | // } else { |
| | | // queryWrapper.orderByAsc(sortData.getProperty()); |
| | | // } |
| | | // } |
| | | // return PageData.from(ywOutinboundMapper.selectPage(page, queryWrapper)); |
| | | // } |
| | | |
| | | @Override |
| | | public long count(YwOutinbound ywOutinbound) { |
| | | QueryWrapper<YwOutinbound> wrapper = new QueryWrapper<>(ywOutinbound); |
| | | return ywOutinboundMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | public synchronized String getNextInOutCode(Integer inOut){ |
| | | String prefix = Constants.equalsInteger(inOut,0)?"RK-":"CK-" + DateUtil.getDate(new Date(),"yyyyMMdd") +"-"; |
| | | Integer countNum = RedisUtil.getObject(redisTemplate, |
| | | Constants.equalsInteger(inOut,0)?Constants.RedisKeys.COM_OUTBOUND_OUT_KEY:Constants.RedisKeys.COM_OUTBOUND_IN_KEY, |
| | | Integer.class); |
| | | countNum = Constants.formatIntegerNum(countNum)+1; |
| | | //æ´æ°ç¼å |
| | | RedisUtil.addObject(redisTemplate,Constants.equalsInteger(inOut,0)?Constants.RedisKeys.COM_OUTBOUND_OUT_KEY:Constants.RedisKeys.COM_OUTBOUND_IN_KEY,countNum); |
| | | String nextIndex =Integer.toString( countNum ); |
| | | return prefix + StringUtils.leftPad(nextIndex,4,"0"); |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwProblemMapper; |
| | | import com.doumee.dao.business.model.YwProblem; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.service.business.YwProblemService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Service |
| | | public class YwProblemServiceImpl implements YwProblemService { |
| | | |
| | | @Autowired |
| | | private YwProblemMapper ywProblemMapper; |
| | | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwProblem ywProblem) { |
| | | if(Objects.isNull(ywProblem) |
| | | || Objects.isNull(ywProblem.getSubmitDate()) |
| | | || StringUtils.isBlank(ywProblem.getContent()) |
| | | || StringUtils.isBlank(ywProblem.getPhone()) |
| | | || StringUtils.isBlank(ywProblem.getName()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | ywProblem.setCreateDate(new Date()); |
| | | ywProblem.setIsdeleted(Constants.ZERO); |
| | | ywProblem.setStatus(Constants.ZERO); |
| | | ywProblem.setDealStatus(Constants.ZERO); |
| | | ywProblemMapper.insert(ywProblem); |
| | | |
| | | List<Multifile> fileList = new ArrayList<>(); |
| | | if(ywProblem.getFileList()!=null && ywProblem.getFileList().size()>0){ |
| | | for (int i = 0; i < ywProblem.getFileList().size(); i++) { |
| | | Multifile multifile = ywProblem.getFileList().get(i); |
| | | if(StringUtils.isBlank(multifile.getFileurl())){ |
| | | continue; |
| | | } |
| | | multifile.setCreateDate(ywProblem.getCreateDate()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(ywProblem.getId()); |
| | | multifile.setObjType(Constants.MultiFile.PROBLEM_FILE.getKey()); |
| | | multifile.setSortnum(i+1); |
| | | fileList.add(multifile); |
| | | } |
| | | } |
| | | if(fileList.size()>0){ |
| | | multifileMapper.insert(fileList); |
| | | } |
| | | |
| | | return ywProblem.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ywProblemMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwProblem ywProblem) { |
| | | UpdateWrapper<YwProblem> deleteWrapper = new UpdateWrapper<>(ywProblem); |
| | | ywProblemMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywProblemMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwProblem ywProblem) { |
| | | ywProblemMapper.updateById(ywProblem); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwProblem> ywProblems) { |
| | | if (CollectionUtils.isEmpty(ywProblems)) { |
| | | return; |
| | | } |
| | | for (YwProblem ywProblem: ywProblems) { |
| | | this.updateById(ywProblem); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwProblem findById(Integer id) { |
| | | return ywProblemMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwProblem findOne(YwProblem ywProblem) { |
| | | QueryWrapper<YwProblem> wrapper = new QueryWrapper<>(ywProblem); |
| | | return ywProblemMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwProblem> findList(YwProblem ywProblem) { |
| | | QueryWrapper<YwProblem> wrapper = new QueryWrapper<>(ywProblem); |
| | | return ywProblemMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwProblem> findPage(PageWrap<YwProblem> pageWrap) { |
| | | IPage<YwProblem> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<YwProblem> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(YwProblem::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(YwProblem::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(YwProblem::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(YwProblem::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getPosition() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getPosition, pageWrap.getModel().getPosition()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getContent() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getContent, pageWrap.getModel().getContent()); |
| | | } |
| | | if (pageWrap.getModel().getPhone() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getPhone, pageWrap.getModel().getPhone()); |
| | | } |
| | | if (pageWrap.getModel().getSubmitDate() != null) { |
| | | queryWrapper.lambda().ge(YwProblem::getSubmitDate, Utils.Date.getStart(pageWrap.getModel().getSubmitDate())); |
| | | queryWrapper.lambda().le(YwProblem::getSubmitDate, Utils.Date.getEnd(pageWrap.getModel().getSubmitDate())); |
| | | } |
| | | if (pageWrap.getModel().getCode() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getCode, pageWrap.getModel().getCode()); |
| | | } |
| | | if (pageWrap.getModel().getDealStatus() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getDealStatus, pageWrap.getModel().getDealStatus()); |
| | | } |
| | | if (pageWrap.getModel().getDealUserId() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getDealUserId, pageWrap.getModel().getDealUserId()); |
| | | } |
| | | if (pageWrap.getModel().getDealDate() != null) { |
| | | queryWrapper.lambda().ge(YwProblem::getDealDate, Utils.Date.getStart(pageWrap.getModel().getDealDate())); |
| | | queryWrapper.lambda().le(YwProblem::getDealDate, Utils.Date.getEnd(pageWrap.getModel().getDealDate())); |
| | | } |
| | | if (pageWrap.getModel().getDealInfo() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getDealInfo, pageWrap.getModel().getDealInfo()); |
| | | } |
| | | if (pageWrap.getModel().getDealType() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getDealType, pageWrap.getModel().getDealType()); |
| | | } |
| | | if (pageWrap.getModel().getWorkorderId() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getWorkorderId, pageWrap.getModel().getWorkorderId()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(ywProblemMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(YwProblem ywProblem) { |
| | | QueryWrapper<YwProblem> wrapper = new QueryWrapper<>(ywProblem); |
| | | return ywProblemMapper.selectCount(wrapper); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwStockMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwStockService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * è¿ç»´åºåä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Service |
| | | public class YwStockServiceImpl implements YwStockService { |
| | | |
| | | @Autowired |
| | | private YwStockMapper ywStockMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwStock ywStock) { |
| | | ywStockMapper.insert(ywStock); |
| | | return ywStock.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ywStockMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwStock ywStock) { |
| | | UpdateWrapper<YwStock> deleteWrapper = new UpdateWrapper<>(ywStock); |
| | | ywStockMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywStockMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwStock ywStock) { |
| | | ywStockMapper.updateById(ywStock); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwStock> ywStocks) { |
| | | if (CollectionUtils.isEmpty(ywStocks)) { |
| | | return; |
| | | } |
| | | for (YwStock ywStock: ywStocks) { |
| | | this.updateById(ywStock); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwStock findById(Integer id) { |
| | | return ywStockMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwStock findOne(YwStock ywStock) { |
| | | QueryWrapper<YwStock> wrapper = new QueryWrapper<>(ywStock); |
| | | return ywStockMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwStock> findList(YwStock ywStock) { |
| | | QueryWrapper<YwStock> wrapper = new QueryWrapper<>(ywStock); |
| | | return ywStockMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwStock> findPage(PageWrap<YwStock> pageWrap) { |
| | | IPage<YwStock> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwStock> queryWrapper = new MPJLambdaWrapper<YwStock>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwStock model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwStock.class) |
| | | .selectAs(YwWarehouse::getName,YwStock::getWarehouseName) |
| | | .selectAs(YwMaterial::getCode,YwStock::getMaterialCode) |
| | | .selectAs(YwMaterial::getName,YwStock::getMaterialName) |
| | | .selectAs(YwMaterial::getQrcode,YwStock::getMaterialQrcode) |
| | | .selectAs(YwMaterial::getBrand,YwStock::getMaterialBrand) |
| | | .selectAs(YwMaterial::getUnitName,YwStock::getMaterialUnitName) |
| | | .selectAs(YwMaterial::getAttr,YwStock::getMaterialAttr) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwStock::getWarehouseId) |
| | | .leftJoin(YwMaterial.class,YwMaterial::getId,YwStock::getMaterialId) |
| | | .eq(Objects.nonNull(model.getWarehouseId()),YwOutinbound::getWarehouseId,model.getWarehouseId()) |
| | | .and(StringUtils.isNotBlank(model.getMaterialCode()),i->i.like(YwMaterial::getName,model.getMaterialCode()).or().like(YwMaterial::getName,model.getMaterialCode())) |
| | | .like(StringUtils.isNotBlank(model.getMaterialCode()),YwMaterial::getCode,model.getMaterialCode()) |
| | | .like(StringUtils.isNotBlank(model.getMaterialAttr()),YwMaterial::getAttr,model.getMaterialAttr()) |
| | | .orderByAsc(YwMaterial::getCode) |
| | | ; |
| | | IPage iPage = ywStockMapper.selectJoinPage(page,YwStock.class,queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public long count(YwStock ywStock) { |
| | | QueryWrapper<YwStock> wrapper = new QueryWrapper<>(ywStock); |
| | | return ywStockMapper.selectCount(wrapper); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwStocktakingMapper; |
| | | import com.doumee.dao.business.YwStocktakingRecordMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwStocktakingRecordService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * è¿ç»´çç¹æç»è®°å½è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Service |
| | | public class YwStocktakingRecordServiceImpl implements YwStocktakingRecordService { |
| | | |
| | | @Autowired |
| | | private YwStocktakingRecordMapper ywStocktakingRecordMapper; |
| | | |
| | | @Autowired |
| | | private YwStocktakingMapper ywStocktakingMapper; |
| | | |
| | | |
| | | @Override |
| | | public Integer create(YwStocktakingRecord ywStocktakingRecord) { |
| | | ywStocktakingRecordMapper.insert(ywStocktakingRecord); |
| | | return ywStocktakingRecord.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ywStocktakingRecordMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwStocktakingRecord ywStocktakingRecord) { |
| | | UpdateWrapper<YwStocktakingRecord> deleteWrapper = new UpdateWrapper<>(ywStocktakingRecord); |
| | | ywStocktakingRecordMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywStocktakingRecordMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwStocktakingRecord ywStocktakingRecord) { |
| | | ywStocktakingRecordMapper.updateById(ywStocktakingRecord); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwStocktakingRecord> ywStocktakingRecords) { |
| | | if (CollectionUtils.isEmpty(ywStocktakingRecords)) { |
| | | return; |
| | | } |
| | | for (YwStocktakingRecord ywStocktakingRecord: ywStocktakingRecords) { |
| | | this.updateById(ywStocktakingRecord); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwStocktakingRecord findById(Integer id) { |
| | | return ywStocktakingRecordMapper.selectById(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public YwStocktakingRecord getDetail(Integer id) { |
| | | MPJLambdaWrapper<YwStocktakingRecord> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwStocktakingRecord.class) |
| | | .selectAs(YwWarehouse::getName, YwStocktakingRecord::getWarehouseName) |
| | | .selectAs(YwMaterial::getCode,YwStocktakingRecord::getMaterialCode) |
| | | .selectAs(YwMaterial::getName,YwStocktakingRecord::getMaterialName) |
| | | .selectAs(YwMaterial::getQrcode,YwStocktakingRecord::getMaterialQrcode) |
| | | .selectAs(YwMaterial::getBrand,YwStocktakingRecord::getMaterialBrand) |
| | | .selectAs(YwMaterial::getUnitName,YwStocktakingRecord::getMaterialUnitName) |
| | | .selectAs(YwMaterial::getAttr,YwStocktakingRecord::getMaterialAttr) |
| | | .selectAs(Company::getName,YwStocktakingRecord::getCompanyName) |
| | | .selectAs(SystemUser::getRealname,YwStocktakingRecord::getUserName) |
| | | .leftJoin(YwStocktaking.class,YwStocktaking::getId,YwStocktakingRecord::getStocktakingId) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwStocktaking::getWarehouseId) |
| | | .leftJoin(YwMaterial.class,YwMaterial::getId,YwStocktakingRecord::getMaterialId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwStocktakingRecord::getUserId) |
| | | .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId) |
| | | .eq(YwStocktakingRecord::getId,id) |
| | | .last(" limit 1 "); |
| | | ; |
| | | return ywStocktakingRecordMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public YwStocktakingRecord findOne(YwStocktakingRecord ywStocktakingRecord) { |
| | | QueryWrapper<YwStocktakingRecord> wrapper = new QueryWrapper<>(ywStocktakingRecord); |
| | | return ywStocktakingRecordMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwStocktakingRecord> findList(YwStocktakingRecord ywStocktakingRecord) { |
| | | QueryWrapper<YwStocktakingRecord> wrapper = new QueryWrapper<>(ywStocktakingRecord); |
| | | return ywStocktakingRecordMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwStocktakingRecord> findPage(PageWrap<YwStocktakingRecord> pageWrap) { |
| | | IPage<YwStocktakingRecord> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwStocktakingRecord> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwStocktakingRecord model = pageWrap.getModel() ; |
| | | queryWrapper.selectAll(YwStocktakingRecord.class) |
| | | .selectAs(YwWarehouse::getName, YwStocktakingRecord::getWarehouseName) |
| | | .selectAs(YwMaterial::getCode,YwStocktakingRecord::getMaterialCode) |
| | | .selectAs(YwMaterial::getName,YwStocktakingRecord::getMaterialName) |
| | | .selectAs(YwMaterial::getQrcode,YwStocktakingRecord::getMaterialQrcode) |
| | | .selectAs(YwMaterial::getBrand,YwStocktakingRecord::getMaterialBrand) |
| | | .selectAs(YwMaterial::getUnitName,YwStocktakingRecord::getMaterialUnitName) |
| | | .selectAs(YwMaterial::getAttr,YwStocktakingRecord::getMaterialAttr) |
| | | .leftJoin(YwStocktaking.class,YwStocktaking::getId,YwStocktakingRecord::getStocktakingId) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwStocktaking::getWarehouseId) |
| | | .leftJoin(YwMaterial.class,YwMaterial::getId,YwStocktakingRecord::getMaterialId) |
| | | .eq(Objects.nonNull(model.getStocktakingId()),YwStocktakingRecord::getStocktakingId,model.getStocktakingId()) |
| | | .and(StringUtils.isNotBlank(model.getMaterialCode()),i->i.like(YwMaterial::getCode,model.getMaterialCode()).or().like(YwMaterial::getName,model.getMaterialCode())) |
| | | .eq(Objects.nonNull(model.getType()),YwStocktakingRecord::getType,model.getType()) |
| | | .eq(Objects.nonNull(model.getStatus()),YwStocktakingRecord::getStatus,model.getStatus()); |
| | | IPage iPage = ywStocktakingRecordMapper.selectJoinPage(page, YwStocktakingRecord.class,queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public long count(YwStocktakingRecord ywStocktakingRecord) { |
| | | QueryWrapper<YwStocktakingRecord> wrapper = new QueryWrapper<>(ywStocktakingRecord); |
| | | return ywStocktakingRecordMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void takingData(YwStocktakingRecord ywStocktakingRecord) { |
| | | if(Objects.isNull(ywStocktakingRecord) |
| | | || Objects.isNull(ywStocktakingRecord.getId()) |
| | | || Objects.isNull(ywStocktakingRecord.getActStock()) |
| | | || ywStocktakingRecord.getActStock().compareTo(BigDecimal.ZERO) < 0 |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywStocktakingRecord.getLoginUserInfo(); |
| | | YwStocktakingRecord model = ywStocktakingRecordMapper.selectById(ywStocktakingRecord.getId()); |
| | | if(Objects.nonNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | YwStocktaking ywStocktaking = ywStocktakingMapper.selectById(ywStocktakingRecord.getStocktakingId()); |
| | | if(Objects.isNull(ywStocktaking)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(loginUserInfo.getId(),ywStocktaking.getUserId())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鿍ççç¹åæ æ³è¿è¡æä½"); |
| | | } |
| | | if(!Constants.equalsInteger(ywStocktaking.getStatus(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"çç¹è®¢ç¶æå·²æµè½¬ï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if(ywStocktakingRecord.getActStock().compareTo(model.getStock())==Constants.ZERO){ |
| | | ywStocktakingRecord.setType(Constants.ZERO); |
| | | }else if(ywStocktakingRecord.getActStock().compareTo(model.getStock())>Constants.ZERO){ |
| | | ywStocktakingRecord.setType(Constants.TWO); |
| | | }else{ |
| | | ywStocktakingRecord.setType(Constants.ONE); |
| | | } |
| | | ywStocktakingRecordMapper.update(new UpdateWrapper<YwStocktakingRecord>().lambda() |
| | | .set(YwStocktakingRecord::getStatus,Constants.ONE) |
| | | .set(YwStocktakingRecord::getType,ywStocktakingRecord.getType()) |
| | | .set(YwStocktakingRecord::getActStock,ywStocktakingRecord.getActStock()) |
| | | .set(YwStocktakingRecord::getUserId,loginUserInfo.getId()) |
| | | .set(YwStocktakingRecord::getPlanDate, DateUtil.getCurrDateTime()) |
| | | .eq(YwStocktakingRecord::getId,ywStocktakingRecord.getId()) |
| | | ); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.utils.redis.RedisUtil; |
| | | import com.doumee.dao.business.YwStockMapper; |
| | | import com.doumee.dao.business.YwStocktakingMapper; |
| | | import com.doumee.dao.business.YwStocktakingRecordMapper; |
| | | import com.doumee.dao.business.YwWarehouseMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.YwStocktakingService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * è¿ç»´çç¹ä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Service |
| | | public class YwStocktakingServiceImpl implements YwStocktakingService { |
| | | |
| | | @Autowired |
| | | private YwStocktakingMapper ywStocktakingMapper; |
| | | |
| | | @Autowired |
| | | private YwStockMapper ywStockMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private YwStocktakingRecordMapper ywStocktakingRecordMapper; |
| | | |
| | | @Autowired |
| | | private YwWarehouseMapper ywWarehouseMapper; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer create(YwStocktaking ywStocktaking) { |
| | | if(Objects.isNull(ywStocktaking) |
| | | || StringUtils.isBlank(ywStocktaking.getName()) |
| | | || Objects.isNull(ywStocktaking.getPlanDate()) |
| | | || Objects.isNull(ywStocktaking.getWarehouseId()) |
| | | || Objects.isNull(ywStocktaking.getUserId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | YwWarehouse ywWarehouse = ywWarehouseMapper.selectById(ywStocktaking.getWarehouseId()); |
| | | if(Objects.isNull(ywWarehouse)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ä»åºæ°æ®"); |
| | | } |
| | | //夿å½åä»åºå½åæ¥ææ¯å¦åå¨çç¹å |
| | | if(ywStocktakingMapper.selectCount(new QueryWrapper<YwStocktaking>().lambda().eq(YwStocktaking::getIsdeleted,Constants.ZERO).eq(YwStocktaking::getStatus,Constants.ZERO) |
| | | .eq(YwStocktaking::getWarehouseId,ywStocktaking.getWarehouseId()).apply(" DATE(PLAN_DATE) = '" + DateUtil.formatDate(ywStocktaking.getPlanDate(),"yyyy-MM-dd") +"'" ))>0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"["+DateUtil.formatDate(ywStocktaking.getPlanDate(),"yyyy-MM-dd")+"]["+ywWarehouse.getName()+"]å·²æçç¹åï¼ä¸å¯éå¤åèµ·çç¹"); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywStocktaking.getLoginUserInfo(); |
| | | ywStocktaking.setCreator(loginUserInfo.getId()); |
| | | ywStocktaking.setCreateDate(new Date()); |
| | | ywStocktaking.setIsdeleted(Constants.ZERO); |
| | | ywStocktaking.setStatus(Constants.ZERO); |
| | | ywStocktaking.setCode(getNextCode()); |
| | | ywStocktakingMapper.insert(ywStocktaking); |
| | | return ywStocktaking.getId(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void deleteById(Integer id, LoginUserInfo loginUserInfo) { |
| | | YwStocktaking model = ywStocktakingMapper.selectById(id); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°çç¹åæ°æ®"); |
| | | } |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.ZERO)||Constants.equalsInteger(model.getStatus(),Constants.THREE)){ |
| | | ywStocktakingMapper.update(new UpdateWrapper<YwStocktaking>().lambda() |
| | | .set(YwStocktaking::getIsdeleted,Constants.ONE) |
| | | .set(YwStocktaking::getEditDate,DateUtil.getCurrDateTime()) |
| | | .set(YwStocktaking::getEditor,loginUserInfo.getId()) |
| | | .eq(YwStocktaking::getId,id) |
| | | ); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"çç¹åç¶æå·²æµè½¬ï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void cancelById(Integer id, LoginUserInfo loginUserInfo) { |
| | | YwStocktaking model = ywStocktakingMapper.selectById(id); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°çç¹åæ°æ®"); |
| | | } |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.ZERO)||Constants.equalsInteger(model.getStatus(),Constants.ONE)){ |
| | | ywStocktakingMapper.update(new UpdateWrapper<YwStocktaking>().lambda() |
| | | .set(YwStocktaking::getEditDate,DateUtil.getCurrDateTime()) |
| | | .set(YwStocktaking::getCancelDate,DateUtil.getCurrDateTime()) |
| | | .set(YwStocktaking::getCancelUserId,loginUserInfo.getId()) |
| | | .set(YwStocktaking::getEditor,loginUserInfo.getId()) |
| | | .set(YwStocktaking::getStatus,Constants.THREE).eq(YwStocktaking::getId,id)); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"çç¹åç¶æå·²æµè½¬ï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void beginById(Integer id, LoginUserInfo loginUserInfo) { |
| | | YwStocktaking model = ywStocktakingMapper.selectById(id); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°çç¹åæ°æ®"); |
| | | } |
| | | if(model.getPlanDate().getTime()<System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªå°å¼å§æ¶é´ï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.ZERO)&&Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | ywStocktakingMapper.update(new UpdateWrapper<YwStocktaking>().lambda() |
| | | .set(YwStocktaking::getEditDate,DateUtil.getCurrDateTime()) |
| | | .set(YwStocktaking::getDealDate,DateUtil.getCurrDateTime()) |
| | | .set(YwStocktaking::getDealUserId,loginUserInfo.getId()) |
| | | .set(YwStocktaking::getEditor,loginUserInfo.getId()) |
| | | .set(YwStocktaking::getStatus,Constants.ONE) |
| | | .eq(YwStocktaking::getId,model.getId())); |
| | | //çæå½åä»åºä¸ææçèµäº§ä¿¡æ¯ |
| | | List<YwStock> stockList = ywStockMapper.selectList(new QueryWrapper<YwStock>().lambda().eq(YwStock::getIsdeleted,Constants.ZERO).eq(YwStock::getWarehouseId,model.getWarehouseId())); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(stockList)){ |
| | | List<YwStocktakingRecord> ywStocktakingRecordList = new ArrayList<>(); |
| | | for (YwStock ywStock:stockList) { |
| | | YwStocktakingRecord ywStocktakingRecord = new YwStocktakingRecord(); |
| | | ywStocktakingRecord.setCreator(loginUserInfo.getId()); |
| | | ywStocktakingRecord.setCreateDate(new Date()); |
| | | ywStocktakingRecord.setIsdeleted(Constants.ZERO); |
| | | ywStocktakingRecord.setStatus(Constants.ZERO); |
| | | ywStocktakingRecord.setMaterialId(ywStock.getMaterialId()); |
| | | ywStocktakingRecord.setStock(ywStock.getStock()); |
| | | ywStocktakingRecord.setStocktakingId(model.getId()); |
| | | ywStocktakingRecordList.add(ywStocktakingRecord); |
| | | } |
| | | ywStocktakingRecordMapper.insert(ywStocktakingRecordList); |
| | | } |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"çç¹åç¶æå·²æµè½¬ï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void finishById(Integer id, LoginUserInfo loginUserInfo) { |
| | | YwStocktaking model = ywStocktakingMapper.selectById(id); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°çç¹åæ°æ®"); |
| | | } |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"çç¹åç¶æå·²æµè½¬ï¼æ æ³è¿è¡è¯¥æä½ï¼"); |
| | | } |
| | | if(!Constants.equalsInteger(loginUserInfo.getId(),model.getUserId())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鿍ççç¹åæ æ³è¿è¡æä½"); |
| | | } |
| | | List<YwStocktakingRecord> recordList = ywStocktakingRecordMapper.selectList(new QueryWrapper<YwStocktakingRecord>().lambda() |
| | | .eq(YwStocktakingRecord::getStocktakingId,id).eq(YwStocktakingRecord::getIsdeleted,Constants.ZERO)); |
| | | for (YwStocktakingRecord ywStocktakingRecord:recordList) { |
| | | //æäº¤æ¶ æªè¿è¡çç¹çæç»æ°æ® |
| | | if(Constants.equalsInteger(ywStocktakingRecord.getStatus(),Constants.ZERO)){ |
| | | ywStocktakingRecordMapper.update(new UpdateWrapper<YwStocktakingRecord>().lambda() |
| | | .set(YwStocktakingRecord::getStatus,Constants.TWO) |
| | | .set(YwStocktakingRecord::getUserId,loginUserInfo.getId()) |
| | | .eq(YwStocktakingRecord::getId,ywStocktakingRecord.getId()) |
| | | ); |
| | | } |
| | | //æ¥è¯¢åºåä¿¡æ¯ è¿è¡åºåæ´æ° |
| | | YwStock ywStock = ywStockMapper.selectOne(new QueryWrapper<YwStock>().lambda().eq(YwStock::getMaterialId,ywStocktakingRecord.getMaterialId()) |
| | | .eq(YwStock::getWarehouseId,model.getWarehouseId()).eq(YwStock::getStock,ywStocktakingRecord.getStock())); |
| | | if(Objects.isNull(ywStock)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åºåä¿¡æ¯å¼å¸¸ï¼è¯·è系管çå"); |
| | | } |
| | | if(ywStocktakingRecord.getActStock().compareTo(BigDecimal.ZERO)==Constants.ZERO){ |
| | | ywStockMapper.deleteById(ywStock.getId()); |
| | | }else { |
| | | ywStockMapper.update(new UpdateWrapper<YwStock>().lambda().set(YwStock::getStock,ywStocktakingRecord.getActStock()).eq(YwStock::getId,ywStock.getId())); |
| | | } |
| | | } |
| | | ywStocktakingMapper.update(new UpdateWrapper<YwStocktaking>().lambda() |
| | | .set(YwStocktaking::getEditDate,DateUtil.getCurrDateTime()) |
| | | .set(YwStocktaking::getDoneDate,DateUtil.getCurrDateTime()) |
| | | .set(YwStocktaking::getDoneUserId,loginUserInfo.getId()) |
| | | .set(YwStocktaking::getEditor,loginUserInfo.getId()) |
| | | .set(YwStocktaking::getStatus,Constants.TWO) |
| | | .eq(YwStocktaking::getId,model.getId())); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwStocktaking ywStocktaking) { |
| | | UpdateWrapper<YwStocktaking> deleteWrapper = new UpdateWrapper<>(ywStocktaking); |
| | | ywStocktakingMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywStocktakingMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwStocktaking ywStocktaking) { |
| | | if(Objects.isNull(ywStocktaking) |
| | | || StringUtils.isBlank(ywStocktaking.getName()) |
| | | || Objects.isNull(ywStocktaking.getId()) |
| | | || Objects.isNull(ywStocktaking.getPlanDate()) |
| | | || Objects.isNull(ywStocktaking.getWarehouseId()) |
| | | || Objects.isNull(ywStocktaking.getUserId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | YwStocktaking model = ywStocktakingMapper.selectById(ywStocktaking.getId()); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°çç¹åæ°æ®"); |
| | | } |
| | | YwWarehouse ywWarehouse = ywWarehouseMapper.selectById(ywStocktaking.getWarehouseId()); |
| | | if(Objects.isNull(ywWarehouse)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ä»åºæ°æ®"); |
| | | } |
| | | //夿å½åä»åºå½åæ¥ææ¯å¦åå¨çç¹å |
| | | if(ywStocktakingMapper.selectCount(new QueryWrapper<YwStocktaking>().lambda().ne(YwStocktaking::getId,ywStocktaking.getId()).eq(YwStocktaking::getIsdeleted,Constants.ZERO).eq(YwStocktaking::getStatus,Constants.ZERO) |
| | | .eq(YwStocktaking::getWarehouseId,ywStocktaking.getWarehouseId()).apply(" DATE(PLAN_DATE) = '" + DateUtil.formatDate(ywStocktaking.getPlanDate(),"yyyy-MM-dd") +"'" ))>0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"["+DateUtil.formatDate(ywStocktaking.getPlanDate(),"yyyy-MM-dd")+"]["+ywWarehouse.getName()+"]å·²æçç¹åï¼ä¸å¯éå¤åèµ·çç¹"); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywStocktaking.getLoginUserInfo(); |
| | | ywStocktaking.setEditor(loginUserInfo.getId()); |
| | | ywStocktaking.setEditDate(new Date()); |
| | | ywStocktaking.setCode(null); |
| | | ywStocktakingMapper.updateById(ywStocktaking); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwStocktaking> ywStocktakings) { |
| | | if (CollectionUtils.isEmpty(ywStocktakings)) { |
| | | return; |
| | | } |
| | | for (YwStocktaking ywStocktaking: ywStocktakings) { |
| | | this.updateById(ywStocktaking); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwStocktaking findById(Integer id) { |
| | | return ywStocktakingMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwStocktaking getDetail(Integer id) { |
| | | MPJLambdaWrapper<YwStocktaking> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwStocktaking.class) |
| | | .select(" s.name ", YwStocktaking::getUserName) |
| | | .select(" s1.name ",YwStocktaking::getCreateName) |
| | | .selectAs(YwWarehouse::getName,YwStocktaking::getWarehouseName) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwStocktaking::getWarehouseId) |
| | | .leftJoin("system_user s on t.user_id = s.id") |
| | | .leftJoin("system_user s1 on t.creator = s1.id") |
| | | .eq(YwStocktaking::getId,id) |
| | | .last("limit 1"); |
| | | YwStocktaking ywStocktaking = ywStocktakingMapper.selectOne(queryWrapper); |
| | | List<YwStocktakingRecord> recordList = ywStocktakingRecordMapper.selectList(new QueryWrapper<YwStocktakingRecord>().lambda().eq(YwStocktakingRecord::getStocktakingId,id).eq(YwStocktakingRecord::getIsdeleted,Constants.ZERO)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(recordList)){ |
| | | //å计çç¹æ°æ® |
| | | ywStocktaking.setFinishAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setUnFinishAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setEqualAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)&&Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setLossAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)&&Constants.equalsInteger(i.getType(),Constants.ONE)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setProfitAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)&&Constants.equalsInteger(i.getType(),Constants.TWO)).collect(Collectors.toList()).size()); |
| | | } |
| | | return ywStocktaking; |
| | | } |
| | | |
| | | @Override |
| | | public YwStocktaking findOne(YwStocktaking ywStocktaking) { |
| | | QueryWrapper<YwStocktaking> wrapper = new QueryWrapper<>(ywStocktaking); |
| | | return ywStocktakingMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwStocktaking> findList(YwStocktaking ywStocktaking) { |
| | | QueryWrapper<YwStocktaking> wrapper = new QueryWrapper<>(ywStocktaking); |
| | | return ywStocktakingMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwStocktaking> findPage(PageWrap<YwStocktaking> pageWrap) { |
| | | IPage<YwStocktaking> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwStocktaking> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwStocktaking model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwStocktaking.class) |
| | | .select(" s.name ", YwStocktaking::getUserName) |
| | | .select(" s1.name ",YwStocktaking::getCreateName) |
| | | .selectAs(YwWarehouse::getName,YwStocktaking::getWarehouseName) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwStocktaking::getWarehouseId) |
| | | .leftJoin("system_user s on t.user_id = s.id") |
| | | .leftJoin("system_user s1 on t.creator = s1.id") |
| | | .eq(YwStocktaking::getIsdeleted,Constants.ZERO) |
| | | .like(StringUtils.isNotBlank(model.getName()),YwStocktaking::getName,model.getName()) |
| | | .eq(Objects.nonNull(model.getStatus()),YwStocktaking::getStatus,model.getStatus()) |
| | | .orderByAsc(YwStocktaking::getStatus) |
| | | .orderByDesc(YwStocktaking::getPlanDate) |
| | | ; |
| | | |
| | | IPage iPage = ywStocktakingMapper.selectJoinPage(page, YwStocktaking.class,queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public long count(YwStocktaking ywStocktaking) { |
| | | QueryWrapper<YwStocktaking> wrapper = new QueryWrapper<>(ywStocktaking); |
| | | return ywStocktakingMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | public synchronized String getNextCode(){ |
| | | String prefix = "PD-" + DateUtil.getDate(new Date(),"yyyyMMdd") +"-"; |
| | | Integer countNum = RedisUtil.getObject(redisTemplate, |
| | | Constants.RedisKeys.COM_OUTBOUND_TAKING_KEY, |
| | | Integer.class); |
| | | countNum = Constants.formatIntegerNum(countNum)+1; |
| | | //æ´æ°ç¼å |
| | | RedisUtil.addObject(redisTemplate, Constants.RedisKeys.COM_OUTBOUND_TAKING_KEY,countNum); |
| | | String nextIndex =Integer.toString( countNum ); |
| | | return prefix + org.apache.commons.lang3.StringUtils.leftPad(nextIndex,4,"0"); |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwStockMapper; |
| | | import com.doumee.dao.business.YwWarehouseMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwWarehouseService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.java.Log; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * è¿ç»´ä»åºä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Service |
| | | public class YwWarehouseServiceImpl implements YwWarehouseService { |
| | | |
| | | @Autowired |
| | | private YwWarehouseMapper ywWarehouseMapper; |
| | | |
| | | @Autowired |
| | | private YwStockMapper ywStockMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer create(YwWarehouse ywWarehouse) { |
| | | if(Objects.isNull(ywWarehouse) |
| | | || StringUtils.isBlank(ywWarehouse.getName()) |
| | | || Objects.isNull(ywWarehouse.getUserId()) |
| | | || Objects.isNull(ywWarehouse.getStatus()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(ywWarehouseMapper.selectCount(new QueryWrapper<YwWarehouse>().lambda().eq(YwWarehouse::getIsdeleted,Constants.ZERO).eq(YwWarehouse::getName,ywWarehouse.getName())) > Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä»åºåç§°å·²åå¨ï¼"); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywWarehouse.getLoginUserInfo(); |
| | | ywWarehouse.setCreator(loginUserInfo.getId()); |
| | | ywWarehouse.setCreateDate(new Date()); |
| | | ywWarehouse.setIsdeleted(Constants.ZERO); |
| | | ywWarehouseMapper.insert(ywWarehouse); |
| | | return ywWarehouse.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id, LoginUserInfo loginUserInfo) { |
| | | YwWarehouse ywWarehouse = ywWarehouseMapper.selectById(id); |
| | | if(Objects.isNull(ywWarehouse)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | //å¤ææ°æ®ä¸æ¯å¦åå¨èµäº§æ°æ® |
| | | if(ywStockMapper.selectCount(new QueryWrapper<YwStock>().lambda().eq(YwStock::getIsdeleted,Constants.ZERO) |
| | | .gt(YwStock::getStock,Constants.ZERO) |
| | | .eq(YwStock::getWarehouseId,ywWarehouse.getId()))>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åä»åºå
æåºåçèµäº§ï¼ä¸å¯å é¤"); |
| | | }; |
| | | ywWarehouseMapper.update(new UpdateWrapper<YwWarehouse>().lambda() |
| | | .set(YwWarehouse::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwWarehouse::getEditor, loginUserInfo.getId()) |
| | | .set(YwWarehouse::getIsdeleted,Constants.ONE) |
| | | .eq(YwWarehouse::getId,ywWarehouse.getId())); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwWarehouse ywWarehouse) { |
| | | UpdateWrapper<YwWarehouse> deleteWrapper = new UpdateWrapper<>(ywWarehouse); |
| | | ywWarehouseMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywWarehouseMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void updateById(YwWarehouse ywWarehouse) { |
| | | if(Objects.isNull(ywWarehouse) |
| | | || StringUtils.isBlank(ywWarehouse.getName()) |
| | | || Objects.isNull(ywWarehouse.getUserId()) |
| | | || Objects.isNull(ywWarehouse.getStatus()) |
| | | || Objects.isNull(ywWarehouse.getId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(ywWarehouseMapper.selectCount(new QueryWrapper<YwWarehouse>().lambda().ne(YwWarehouse::getId,ywWarehouse.getId()).eq(YwWarehouse::getIsdeleted,Constants.ZERO).eq(YwWarehouse::getName,ywWarehouse.getName())) > Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä»åºåç§°å·²åå¨ï¼"); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywWarehouse.getLoginUserInfo(); |
| | | ywWarehouse.setEditor(loginUserInfo.getId()); |
| | | ywWarehouse.setEditDate(new Date()); |
| | | ywWarehouse.setIsdeleted(Constants.ZERO); |
| | | ywWarehouseMapper.updateById(ywWarehouse); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwWarehouse> ywWarehouses) { |
| | | if (CollectionUtils.isEmpty(ywWarehouses)) { |
| | | return; |
| | | } |
| | | for (YwWarehouse ywWarehouse: ywWarehouses) { |
| | | this.updateById(ywWarehouse); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwWarehouse findById(Integer id) { |
| | | return ywWarehouseMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwWarehouse findOne(YwWarehouse ywWarehouse) { |
| | | QueryWrapper<YwWarehouse> wrapper = new QueryWrapper<>(ywWarehouse); |
| | | return ywWarehouseMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwWarehouse> findList(YwWarehouse model) { |
| | | MPJLambdaWrapper<YwWarehouse> queryWrapper = new MPJLambdaWrapper<YwWarehouse>(); |
| | | queryWrapper.selectAll(YwWarehouse.class) |
| | | .eq(Objects.nonNull(model.getStatus()),YwWarehouse::getStatus,model.getStatus()) |
| | | .eq(YwWarehouse::getIsdeleted,Constants.ZERO) |
| | | .eq(YwWarehouse::getStatus,Constants.ZERO) |
| | | .orderByAsc(YwWarehouse::getSortnum) |
| | | ; |
| | | return ywWarehouseMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwWarehouse> findPage(PageWrap<YwWarehouse> pageWrap) { |
| | | IPage<YwWarehouse> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwWarehouse> queryWrapper = new MPJLambdaWrapper<YwWarehouse>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwWarehouse model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwWarehouse.class) |
| | | .selectAs(SystemUser::getRealname, YwWarehouse::getUserName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWarehouse::getUserId) |
| | | .eq(Objects.nonNull(model.getStatus()),YwWarehouse::getStatus,model.getStatus()) |
| | | .like(StringUtils.isNotBlank(model.getName()),YwWarehouse::getName,model.getName()) |
| | | .eq(YwWarehouse::getIsdeleted,Constants.ZERO) |
| | | ; |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | IPage iPage = ywWarehouseMapper.selectJoinPage(page,YwWarehouse.class,queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | |
| | | // @Override |
| | | // public PageData<YwWarehouse> findPage(PageWrap<YwWarehouse> pageWrap) { |
| | | // IPage<YwWarehouse> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | // QueryWrapper<YwWarehouse> queryWrapper = new QueryWrapper<>(); |
| | | // Utils.MP.blankToNull(pageWrap.getModel()); |
| | | // |
| | | // if (pageWrap.getModel().getId() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getId, pageWrap.getModel().getId()); |
| | | // } |
| | | // if (pageWrap.getModel().getCreator() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getCreator, pageWrap.getModel().getCreator()); |
| | | // } |
| | | // if (pageWrap.getModel().getCreateDate() != null) { |
| | | // queryWrapper.lambda().ge(YwWarehouse::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | // queryWrapper.lambda().le(YwWarehouse::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | // } |
| | | // if (pageWrap.getModel().getEditor() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getEditor, pageWrap.getModel().getEditor()); |
| | | // } |
| | | // if (pageWrap.getModel().getEditDate() != null) { |
| | | // queryWrapper.lambda().ge(YwWarehouse::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | // queryWrapper.lambda().le(YwWarehouse::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | // } |
| | | // if (pageWrap.getModel().getRemark() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getRemark, pageWrap.getModel().getRemark()); |
| | | // } |
| | | // if (pageWrap.getModel().getStatus() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getStatus, pageWrap.getModel().getStatus()); |
| | | // } |
| | | // if (pageWrap.getModel().getName() != null) { |
| | | // queryWrapper.lambda().like(YwWarehouse::getName, pageWrap.getModel().getName()); |
| | | // } |
| | | // if (pageWrap.getModel().getPosition() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getPosition, pageWrap.getModel().getPosition()); |
| | | // } |
| | | // if (pageWrap.getModel().getCode() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getCode, pageWrap.getModel().getCode()); |
| | | // } |
| | | // if (pageWrap.getModel().getUserId() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getUserId, pageWrap.getModel().getUserId()); |
| | | // } |
| | | // if (pageWrap.getModel().getSortnum() != null) { |
| | | // queryWrapper.lambda().eq(YwWarehouse::getSortnum, pageWrap.getModel().getSortnum()); |
| | | // } |
| | | // for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | // if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | // queryWrapper.orderByDesc(sortData.getProperty()); |
| | | // } else { |
| | | // queryWrapper.orderByAsc(sortData.getProperty()); |
| | | // } |
| | | // } |
| | | // return PageData.from(ywWarehouseMapper.selectPage(page, queryWrapper)); |
| | | // } |
| | | |
| | | @Override |
| | | public long count(YwWarehouse ywWarehouse) { |
| | | QueryWrapper<YwWarehouse> wrapper = new QueryWrapper<>(ywWarehouse); |
| | | return ywWarehouseMapper.selectCount(wrapper); |
| | | } |
| | | } |