Merge remote-tracking branch 'origin/ycawdasrs-2' into ycawdasrs-2
# Conflicts:
# src/main/java/com/zy/asrs/controller/MobileController.java
55 文件已重命名
66个文件已添加
37个文件已修改
| | |
| | | </list> |
| | | </option> |
| | | </component> |
| | | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
| | | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
| | | <output url="file://$PROJECT_DIR$/out" /> |
| | | </component> |
| | | </project> |
| | |
| | | return R.ok(matService.selectOne(new EntityWrapper<Mat>().eq("matnr", matnr))); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/mat/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.model.WrkDto; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import com.zy.third.entity.ExdvYanbu; |
| | | import com.zy.third.mapper.ExdMaterialMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("mobile") |
| | | public class MobileController extends BaseController { |
| | | public class MobileController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MobileService mobileService; |
| | |
| | | @Autowired |
| | | private ConfigService configService; |
| | | |
| | | @Autowired |
| | | private ExdMaterialMapper exdMaterialMapper; |
| | | |
| | | // 商品上架 |
| | | @RequestMapping("/mat/onSale/auth") |
| | | @ManagerAuth |
| | | public R matOnSale(@RequestBody CombParam combParam){ |
| | | public R matOnSale(@RequestBody CombParam combParam) { |
| | | mobileService.onSale(combParam); |
| | | return R.ok("上架成功"); |
| | | } |
| | | |
| | | // 商品下架 |
| | | @RequestMapping("/mat/offSale/auth") |
| | | //@ManagerAuth |
| | | public R matOffSale(@RequestBody OffSaleParam offSaleParam){ |
| | | public R matOffSale(@RequestBody OffSaleParam offSaleParam) { |
| | | mobileService.offSale(offSaleParam); |
| | | return R.ok("下架成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | // 组托 ---------------------------------------------------------------------------------------------------- |
| | |
| | | */ |
| | | @RequestMapping("/order/search/orderNo/auth") |
| | | @ManagerAuth |
| | | public R orderSearchByBarcode(@RequestParam String orderNo){ |
| | | public R orderSearchByBarcode(@RequestParam String orderNo) { |
| | | Order order = orderService.selectByNo(orderNo); |
| | | if (order == null) { |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam){ |
| | | mobileService.comb(combParam, getUserId()); |
| | | public R comb(@RequestBody CombParam combParam) { |
| | | mobileService.comb(combParam, getUserId(), getUser().getEmail()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/pack/get/auth") |
| | | @ManagerAuth |
| | | public R packGet(@RequestParam String barcode){ |
| | | public R packGet(@RequestParam String barcode) { |
| | | Pack pack = packService.selectByBarcode(barcode); |
| | | if (pack == null) { |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping("/pack/comb/auth") |
| | | @ManagerAuth(memo = "下线组托") |
| | | public R packComb(@RequestBody CombParam combParam){ |
| | | public R packComb(@RequestBody CombParam combParam) { |
| | | mobileService.packComb(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | |
| | | @Deprecated |
| | | public R pakoutQuery(@RequestParam(required = false) String barcode, |
| | | @RequestParam(required = false) Integer staNo, |
| | | @RequestParam(required = false) String matnr){ |
| | | @RequestParam(required = false) String matnr) { |
| | | if (Cools.isEmpty(barcode) && Cools.isEmpty(matnr)) { |
| | | return R.ok(); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping("/pakout/confirm/barcode/auth") |
| | | @ManagerAuth |
| | | public R pakoutQueryByBarcode(@RequestParam(required = false) String barcode){ |
| | | public R pakoutQueryByBarcode(@RequestParam(required = false) String barcode) { |
| | | if (Cools.isEmpty(barcode)) { |
| | | return R.ok(); |
| | | } |
| | |
| | | // 根据库位码和商品码搜索商品 |
| | | @RequestMapping("/mat/find/auth") |
| | | public R find(@RequestParam(required = false) String locNo |
| | | , @RequestParam(required = false) String matnr){ |
| | | , @RequestParam(required = false) String matnr) { |
| | | //List<ManLocDetl> manLocDetls = manLocDetlMapper.selectItem0(locNo, matnr); |
| | | ManLocDetl manLocDetl = manLocDetlMapper.selectLocNo0(locNo, matnr); |
| | | return R.ok(manLocDetl); |
| | |
| | | @RequestMapping("/pakout/confirm/pick/auth") |
| | | @ManagerAuth |
| | | public R pakoutQueryByBarcode(@RequestParam(required = false) Integer wrkNo |
| | | , @RequestParam(required = false) String matnr){ |
| | | , @RequestParam(required = false) String matnr) { |
| | | if (Cools.isEmpty(wrkNo)) { |
| | | return R.ok(); |
| | | } |
| | |
| | | for (WrkDetl wrkDetl : dto.getWrkDetls()) { |
| | | wrkDetlService.updateInspect(wrkDetl.getWrkNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); |
| | | } |
| | | if(wrkMast.getIoType() == 103 || wrkMast.getIoType() == 107) { |
| | | if (wrkMast.getIoType() == 103 || wrkMast.getIoType() == 107) { |
| | | wrkMast.setWrkSts(34L);//下架完成等待回库 |
| | | }else { |
| | | } else { |
| | | wrkMast.setWrkSts(15L); |
| | | } |
| | | wrkMastService.updateById(wrkMast); |
| | |
| | | |
| | | @RequestMapping("/adjust/auth") |
| | | @ManagerAuth(memo = "盘点") |
| | | public R adjust(@RequestBody MobileAdjustParam combParam){ |
| | | public R adjust(@RequestBody MobileAdjustParam combParam) { |
| | | mobileService.adjust(combParam, getUserId()); |
| | | return R.ok("盘点成功"); |
| | | } |
| | |
| | | @PostMapping("/order/out/pakout/auth") |
| | | @ManagerAuth(memo = "订单出库") |
| | | public synchronized R pakoutByOrder(@RequestBody JSONObject param) { |
| | | if(!param.containsKey("staNo") || !param.containsKey("orderNo")){ |
| | | if (!param.containsKey("staNo") || !param.containsKey("orderNo")) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | mobileService.pakoutByOrder(param,getUserId()); |
| | | mobileService.pakoutByOrder(param, getUserId()); |
| | | return R.ok("出库成功"); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 补空板 区域到点 |
| | | * |
| | | * @param locNo 目标站点 |
| | | * @param size 托盘大小 1:小托盘 2:大托盘 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/FillEmptyPallets") |
| | | public synchronized R FillEmptyPallets(@RequestParam(required = false) String locNo |
| | | ,@RequestParam(required = false) String size){ |
| | | , @RequestParam(required = false) String size) { |
| | | if (Cools.isEmpty(locNo) || Cools.isEmpty(size)) { |
| | | return R.error("站点或者大小不能为空"); |
| | | |
| | | } |
| | | //空托盘缓冲区 小:E8 大:E9 |
| | | String rStaNo ="E8"; |
| | | if(size.equals("2")){ |
| | | String rStaNo = "E8"; |
| | | if (size.equals("2")) { |
| | | rStaNo = "E9"; |
| | | } |
| | | LinkedHashMap<String,Object> rcsParam=new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> rcsParam = new LinkedHashMap<>(); |
| | | rcsParam.put("taskType", "PF-FMR-COMMON"); |
| | | List<LinkedHashMap<String,Object>> targetRoutes=new ArrayList<>(); |
| | | LinkedHashMap<String,Object> t1=new LinkedHashMap<>(); |
| | | LinkedHashMap<String,Object> t2=new LinkedHashMap<>(); |
| | | List<LinkedHashMap<String, Object>> targetRoutes = new ArrayList<>(); |
| | | LinkedHashMap<String, Object> t1 = new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> t2 = new LinkedHashMap<>(); |
| | | t1.put("seq", 0); |
| | | t1.put("type","ZONE"); |
| | | t1.put("type", "ZONE"); |
| | | t1.put("code", rStaNo); |
| | | t1.put("autoStart",0); |
| | | t1.put("operation","COLLECT"); |
| | | t1.put("autoStart", 0); |
| | | t1.put("operation", "COLLECT"); |
| | | |
| | | t2.put("seq", 0); |
| | | t2.put("type","SITE"); |
| | | t2.put("type", "SITE"); |
| | | t2.put("code", locNo); |
| | | t2.put("autoStart",0); |
| | | t2.put("operation","DELIVERY"); |
| | | t2.put("autoStart", 0); |
| | | t2.put("operation", "DELIVERY"); |
| | | |
| | | targetRoutes.add(t1); |
| | | targetRoutes.add(t2); |
| | |
| | | rcsParam.put("initPriority", 100); |
| | | |
| | | |
| | | String response =""; |
| | | Boolean bool =false; |
| | | String response = ""; |
| | | Boolean bool = false; |
| | | String msg = ""; |
| | | HashMap<String,Object> map = new HashMap<>(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Date date = new Date(); |
| | | String time = date.getTime()+""; |
| | | String time = date.getTime() + ""; |
| | | |
| | | map.put("X-LR-REQUEST-ID", time); |
| | | try { |
| | | log.info("wms派发搬运任务给AGV搬运={}", rcsParam); |
| | | response = new HttpHandler.Builder() |
| | | .setHeaders(map) |
| | | .setHeaders(map) |
| | | .setUri(url) |
| | | .setHttps(true) |
| | | .setPath(attrcs) |
| | |
| | | .build() |
| | | .doPostCloseSSL(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if(jsonObject.getString("code").equals("SUCCESS")){ |
| | | if (jsonObject.getString("code").equals("SUCCESS")) { |
| | | bool = true; |
| | | }else{ |
| | | msg=jsonObject.getString("message"); |
| | | } else { |
| | | msg = jsonObject.getString("message"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | ); |
| | | } |
| | | |
| | | if(bool){ |
| | | if (bool) { |
| | | return R.ok(); |
| | | }else { |
| | | } else { |
| | | return R.error(msg); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 空托盘回库 |
| | | * |
| | | * @param sourceStaNo 原站点 |
| | | * @param barcode 托盘大小 1:小托盘 2:大托盘 目标区或者巷道 |
| | | * @param barcode 托盘大小 1:小托盘 2:大托盘 目标区或者巷道 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/FillEmptyPalletsStack") |
| | | public synchronized R FillEmptyPalletsStack(@RequestParam(required = false) String sourceStaNo |
| | | ,@RequestParam(required = false) String barcode){ |
| | | , @RequestParam(required = false) String barcode) { |
| | | if (Cools.isEmpty(sourceStaNo) || Cools.isEmpty(barcode)) { |
| | | return R.error("站点或者大小不能为空"); |
| | | |
| | | } |
| | | //空托盘缓冲区 小:E8 大:E9 |
| | | String rStaNo = "E8"; |
| | | if (barcode.substring(0, 1).equals("9")) { |
| | | String rStaNo ="E8"; |
| | | String type ="ZONE"; //区域 |
| | | if(barcode.substring(0,1).equals("9")){ |
| | | rStaNo = "E9"; |
| | | } |
| | | String type = "ZONE"; //区域 |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "autoE").eq("status", "1")); |
| | | if (config != null) { |
| | | type = "STACK"; //巷道 |
| | | if (Cools.isEmpty(config.getValue())) { |
| | | rStaNo = rStaNo + "01"; |
| | | config.setValue("2"); |
| | | } else if (config.getValue().equals("1")) { |
| | | rStaNo = rStaNo + "01"; |
| | | config.setValue("2"); |
| | | } else if (config.getValue().equals("2")) { |
| | | rStaNo = rStaNo + "02"; |
| | | config.setValue("3"); |
| | | } else if (config.getValue().equals("3")) { |
| | | rStaNo = rStaNo + "03"; |
| | | config.setValue("1"); |
| | | } |
| | | configService.updateById(config); |
| | | }else{ |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "autoE").eq("status", "1")); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | LinkedHashMap<String,Object> rcsParam=new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> rcsParam = new LinkedHashMap<>(); |
| | | rcsParam.put("taskType", "PF-FMR-COMMON"); |
| | | List<LinkedHashMap<String,Object>> targetRoutes=new ArrayList<>(); |
| | | LinkedHashMap<String,Object> t1=new LinkedHashMap<>(); |
| | | LinkedHashMap<String,Object> t2=new LinkedHashMap<>(); |
| | | List<LinkedHashMap<String, Object>> targetRoutes = new ArrayList<>(); |
| | | LinkedHashMap<String, Object> t1 = new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> t2 = new LinkedHashMap<>(); |
| | | t1.put("seq", 0); |
| | | t1.put("type","SITE"); |
| | | t1.put("type", "SITE"); |
| | | t1.put("code", sourceStaNo); |
| | | t1.put("autoStart",0); |
| | | t1.put("operation","COLLECT"); |
| | | t1.put("autoStart", 0); |
| | | t1.put("operation", "COLLECT"); |
| | | |
| | | t2.put("seq", 0); |
| | | t2.put("type",type); |
| | | t2.put("type", type); |
| | | t2.put("code", rStaNo); |
| | | t2.put("autoStart",0); |
| | | t2.put("operation","DELIVERY"); |
| | | t2.put("autoStart", 0); |
| | | t2.put("operation", "DELIVERY"); |
| | | |
| | | targetRoutes.add(t1); |
| | | targetRoutes.add(t2); |
| | |
| | | rcsParam.put("initPriority", 100); |
| | | |
| | | |
| | | String response =""; |
| | | Boolean bool =false; |
| | | String response = ""; |
| | | Boolean bool = false; |
| | | String msg = ""; |
| | | HashMap<String,Object> map = new HashMap<>(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Date date = new Date(); |
| | | String time = date.getTime()+""; |
| | | String time = date.getTime() + ""; |
| | | |
| | | map.put("X-LR-REQUEST-ID", time); |
| | | try { |
| | |
| | | .build() |
| | | .doPostCloseSSL(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if(jsonObject.getString("code").equals("SUCCESS")){ |
| | | if (jsonObject.getString("code").equals("SUCCESS")) { |
| | | bool = true; |
| | | }else{ |
| | | msg=jsonObject.getString("message"); |
| | | } else { |
| | | msg = jsonObject.getString("message"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | ); |
| | | } |
| | | |
| | | if(bool){ |
| | | if (bool) { |
| | | return R.ok(); |
| | | }else { |
| | | } else { |
| | | return R.error(msg); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 执行移库任务--点到点 |
| | | * |
| | | * @param sourceStaNo |
| | | * @param staNo |
| | | * @return |
| | | */ |
| | | @RequestMapping("/SITESITEAGVMove") |
| | | public synchronized R SITESITEAGVMove(@RequestParam(required = false) String sourceStaNo |
| | | ,@RequestParam(required = false) String staNo |
| | | ,@RequestParam(required = false) String taskNo){ |
| | | , @RequestParam(required = false) String staNo |
| | | , @RequestParam(required = false) String taskNo) { |
| | | if (Cools.isEmpty(sourceStaNo) || Cools.isEmpty(staNo)) { |
| | | return R.error("源站点和目标站点不能为空"); |
| | | |
| | | } |
| | | |
| | | LinkedHashMap<String,Object> rcsParam=new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> rcsParam = new LinkedHashMap<>(); |
| | | rcsParam.put("taskType", "PF-FMR-COMMON"); |
| | | if(!Cools.isEmpty(taskNo)){ |
| | | if (!Cools.isEmpty(taskNo)) { |
| | | rcsParam.put("robotTaskCode", taskNo); |
| | | } |
| | | |
| | | List<LinkedHashMap<String,Object>> targetRoutes=new ArrayList<>(); |
| | | LinkedHashMap<String,Object> t1=new LinkedHashMap<>(); |
| | | LinkedHashMap<String,Object> t2=new LinkedHashMap<>(); |
| | | List<LinkedHashMap<String, Object>> targetRoutes = new ArrayList<>(); |
| | | LinkedHashMap<String, Object> t1 = new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> t2 = new LinkedHashMap<>(); |
| | | t1.put("seq", 0); |
| | | t1.put("type","SITE"); |
| | | t1.put("type", "SITE"); |
| | | t1.put("code", sourceStaNo); |
| | | t1.put("autoStart",0); |
| | | t1.put("operation","COLLECT"); |
| | | t1.put("autoStart", 0); |
| | | t1.put("operation", "COLLECT"); |
| | | |
| | | t2.put("seq", 0); |
| | | t2.put("type","SITE"); |
| | | t2.put("type", "SITE"); |
| | | t2.put("code", staNo); |
| | | t2.put("autoStart",0); |
| | | t2.put("operation","DELIVERY"); |
| | | t2.put("autoStart", 0); |
| | | t2.put("operation", "DELIVERY"); |
| | | |
| | | targetRoutes.add(t1); |
| | | targetRoutes.add(t2); |
| | |
| | | rcsParam.put("initPriority", 100); |
| | | |
| | | |
| | | String response =""; |
| | | Boolean bool =false; |
| | | String response = ""; |
| | | Boolean bool = false; |
| | | String msg = ""; |
| | | HashMap<String,Object> map = new HashMap<>(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Date date = new Date(); |
| | | String time = date.getTime()+""; |
| | | String time = date.getTime() + ""; |
| | | |
| | | map.put("X-LR-REQUEST-ID", time); |
| | | try { |
| | |
| | | .build() |
| | | .doPostCloseSSL(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if(jsonObject.getString("code").equals("SUCCESS")){ |
| | | if (jsonObject.getString("code").equals("SUCCESS")) { |
| | | bool = true; |
| | | }else{ |
| | | msg=jsonObject.getString("message"); |
| | | } else { |
| | | msg = jsonObject.getString("message"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | ); |
| | | } |
| | | |
| | | if(bool){ |
| | | if (bool) { |
| | | return R.ok(); |
| | | }else { |
| | | } else { |
| | | return R.error(msg); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 执行移库任务--点到区域 |
| | | * |
| | | * @param sourceStaNo |
| | | * @param staNo |
| | | * @return |
| | | */ |
| | | @RequestMapping("/SITEZONEAGVMove") |
| | | public synchronized R SITEZONEAGVMove(@RequestParam(required = false) String sourceStaNo |
| | | ,@RequestParam(required = false) String staNo |
| | | ,@RequestParam(required = false) String taskNo){ |
| | | , @RequestParam(required = false) String staNo |
| | | , @RequestParam(required = false) String taskNo) { |
| | | if (Cools.isEmpty(sourceStaNo) || Cools.isEmpty(staNo)) { |
| | | return R.error("源站点和目标站点不能为空"); |
| | | |
| | | } |
| | | LinkedHashMap<String,Object> rcsParam=new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> rcsParam = new LinkedHashMap<>(); |
| | | rcsParam.put("taskType", "PF-FMR-COMMON"); |
| | | if(!Cools.isEmpty(taskNo)){ |
| | | if (!Cools.isEmpty(taskNo)) { |
| | | rcsParam.put("robotTaskCode", taskNo); |
| | | } |
| | | |
| | | List<LinkedHashMap<String,Object>> targetRoutes=new ArrayList<>(); |
| | | LinkedHashMap<String,Object> t1=new LinkedHashMap<>(); |
| | | LinkedHashMap<String,Object> t2=new LinkedHashMap<>(); |
| | | List<LinkedHashMap<String, Object>> targetRoutes = new ArrayList<>(); |
| | | LinkedHashMap<String, Object> t1 = new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> t2 = new LinkedHashMap<>(); |
| | | t1.put("seq", 0); |
| | | t1.put("type","SITE"); |
| | | t1.put("type", "SITE"); |
| | | t1.put("code", sourceStaNo); |
| | | t1.put("autoStart",0); |
| | | t1.put("operation","COLLECT"); |
| | | t1.put("autoStart", 0); |
| | | t1.put("operation", "COLLECT"); |
| | | |
| | | t2.put("seq", 0); |
| | | t2.put("type","ZONE"); |
| | | t2.put("type", "ZONE"); |
| | | t2.put("code", staNo); |
| | | t2.put("autoStart",0); |
| | | t2.put("operation","DELIVERY"); |
| | | t2.put("autoStart", 0); |
| | | t2.put("operation", "DELIVERY"); |
| | | |
| | | targetRoutes.add(t1); |
| | | targetRoutes.add(t2); |
| | |
| | | rcsParam.put("initPriority", 100); |
| | | |
| | | |
| | | String response =""; |
| | | Boolean bool =false; |
| | | String response = ""; |
| | | Boolean bool = false; |
| | | String msg = ""; |
| | | HashMap<String,Object> map = new HashMap<>(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Date date = new Date(); |
| | | String time = date.getTime()+""; |
| | | String time = date.getTime() + ""; |
| | | |
| | | map.put("X-LR-REQUEST-ID", time); |
| | | try { |
| | |
| | | .build() |
| | | .doPostCloseSSL(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if(jsonObject.getString("code").equals("SUCCESS")){ |
| | | if (jsonObject.getString("code").equals("SUCCESS")) { |
| | | bool = true; |
| | | }else{ |
| | | msg=jsonObject.getString("message"); |
| | | } else { |
| | | msg = jsonObject.getString("message"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | ); |
| | | } |
| | | |
| | | if(bool){ |
| | | if (bool) { |
| | | return R.ok(); |
| | | }else { |
| | | } else { |
| | | return R.error(msg); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 执行移库任务--区域到点 |
| | | * |
| | | * @param sourceStaNo |
| | | * @param staNo |
| | | * @return |
| | | */ |
| | | @RequestMapping("/ZONESITEAGVMove") |
| | | public synchronized R ZONESITEAGVMove(@RequestParam(required = false) String sourceStaNo |
| | | ,@RequestParam(required = false) String staNo |
| | | ,@RequestParam(required = false) String taskNo){ |
| | | , @RequestParam(required = false) String staNo |
| | | , @RequestParam(required = false) String taskNo) { |
| | | if (Cools.isEmpty(sourceStaNo) || Cools.isEmpty(staNo)) { |
| | | return R.error("源站点和目标站点不能为空"); |
| | | |
| | | } |
| | | LinkedHashMap<String,Object> rcsParam=new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> rcsParam = new LinkedHashMap<>(); |
| | | rcsParam.put("taskType", "PF-FMR-COMMON"); |
| | | if(!Cools.isEmpty(taskNo)){ |
| | | if (!Cools.isEmpty(taskNo)) { |
| | | rcsParam.put("robotTaskCode", taskNo); |
| | | } |
| | | |
| | | List<LinkedHashMap<String,Object>> targetRoutes=new ArrayList<>(); |
| | | LinkedHashMap<String,Object> t1=new LinkedHashMap<>(); |
| | | LinkedHashMap<String,Object> t2=new LinkedHashMap<>(); |
| | | List<LinkedHashMap<String, Object>> targetRoutes = new ArrayList<>(); |
| | | LinkedHashMap<String, Object> t1 = new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> t2 = new LinkedHashMap<>(); |
| | | t1.put("seq", 0); |
| | | t1.put("type","ZONE"); |
| | | t1.put("type", "ZONE"); |
| | | t1.put("code", sourceStaNo); |
| | | t1.put("autoStart",0); |
| | | t1.put("operation","COLLECT"); |
| | | t1.put("autoStart", 0); |
| | | t1.put("operation", "COLLECT"); |
| | | |
| | | t2.put("seq", 0); |
| | | t2.put("type","SITE"); |
| | | t2.put("type", "SITE"); |
| | | t2.put("code", staNo); |
| | | t2.put("autoStart",0); |
| | | t2.put("operation","DELIVERY"); |
| | | t2.put("autoStart", 0); |
| | | t2.put("operation", "DELIVERY"); |
| | | |
| | | targetRoutes.add(t1); |
| | | targetRoutes.add(t2); |
| | |
| | | rcsParam.put("initPriority", 100); |
| | | |
| | | |
| | | String response =""; |
| | | Boolean bool =false; |
| | | String response = ""; |
| | | Boolean bool = false; |
| | | String msg = ""; |
| | | HashMap<String,Object> map = new HashMap<>(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Date date = new Date(); |
| | | String time = date.getTime()+""; |
| | | String time = date.getTime() + ""; |
| | | |
| | | map.put("X-LR-REQUEST-ID", time); |
| | | try { |
| | |
| | | .build() |
| | | .doPostCloseSSL(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if(jsonObject.getString("code").equals("SUCCESS")){ |
| | | if (jsonObject.getString("code").equals("SUCCESS")) { |
| | | bool = true; |
| | | }else{ |
| | | msg=jsonObject.getString("message"); |
| | | } else { |
| | | msg = jsonObject.getString("message"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | ); |
| | | } |
| | | |
| | | if(bool){ |
| | | if (bool) { |
| | | return R.ok(); |
| | | }else { |
| | | } else { |
| | | return R.error(msg); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * AGV站点绑定和解绑 |
| | | * @param sourceStaNo //站点 |
| | | * @param barcodeType //托盘码 |
| | | * @param invoke //BIND为绑定 UNBIND为解绑 |
| | | * |
| | | * @param sourceStaNo //站点 |
| | | * @param barcodeType //托盘码 |
| | | * @param invoke //BIND为绑定 UNBIND为解绑 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/siteBindAndUnbind") |
| | | public synchronized R siteBindAndUnbind(@RequestParam(required = false) String sourceStaNo |
| | | ,@RequestParam(required = false) String barcodeType |
| | | ,@RequestParam(required = false) String invoke){ |
| | | , @RequestParam(required = false) String barcodeType |
| | | , @RequestParam(required = false) String invoke) { |
| | | if (Cools.isEmpty(sourceStaNo) || Cools.isEmpty(barcodeType)) { |
| | | return R.error("站点和托盘类型不能为空"); |
| | | |
| | | } |
| | | if(barcodeType.substring(0,1).equals("8")){ |
| | | barcodeType="11"; |
| | | }else if(barcodeType.substring(0,1).equals("9")){ |
| | | barcodeType="21"; |
| | | if (barcodeType.substring(0, 1).equals("8")) { |
| | | barcodeType = "11"; |
| | | } else if (barcodeType.substring(0, 1).equals("9")) { |
| | | barcodeType = "21"; |
| | | } |
| | | LinkedHashMap<String,Object> rcsParam=new LinkedHashMap<>(); |
| | | LinkedHashMap<String, Object> rcsParam = new LinkedHashMap<>(); |
| | | rcsParam.put("slotCategory", "SITE"); |
| | | rcsParam.put("slotCode", sourceStaNo); |
| | | rcsParam.put("carrierCategory", "PALLET"); |
| | | rcsParam.put("carrierType", barcodeType);//11为小托盘 21为大托盘 |
| | | if(sourceStaNo.equals("101")){ |
| | | rcsParam.put("carrierDir","0"); |
| | | }else if(sourceStaNo.equals("R01")||sourceStaNo.equals("R03")){ |
| | | rcsParam.put("carrierDir","-90"); |
| | | if (sourceStaNo.equals("101")) { |
| | | rcsParam.put("carrierDir", "0"); |
| | | } else if (sourceStaNo.equals("R01") || sourceStaNo.equals("R03")) { |
| | | rcsParam.put("carrierDir", "-90"); |
| | | |
| | | }else if(sourceStaNo.equals("R02")){ |
| | | rcsParam.put("carrierDir","90"); |
| | | }else { |
| | | rcsParam.put("carrierDir","180"); |
| | | } |
| | | } else if (sourceStaNo.equals("R02")) { |
| | | rcsParam.put("carrierDir", "90"); |
| | | } else { |
| | | rcsParam.put("carrierDir", "180"); |
| | | } |
| | | |
| | | rcsParam.put("temporary", ""); |
| | | rcsParam.put("invoke", invoke); |
| | | |
| | | |
| | | String response =""; |
| | | Boolean bool =false; |
| | | String response = ""; |
| | | Boolean bool = false; |
| | | String msg = ""; |
| | | HashMap<String,Object> map = new HashMap<>(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Date date = new Date(); |
| | | String time = date.getTime()+""; |
| | | String time = date.getTime() + ""; |
| | | |
| | | map.put("X-LR-REQUEST-ID", time); |
| | | try { |
| | | log.info("WMS完成"+invoke+"agv站点={},上报参数为={}",sourceStaNo,rcsParam); |
| | | log.info("WMS完成" + invoke + "agv站点={},上报参数为={}", sourceStaNo, rcsParam); |
| | | response = new HttpHandler.Builder() |
| | | .setHeaders(map) |
| | | .setUri(url) |
| | |
| | | .build() |
| | | .doPostCloseSSL(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if(jsonObject.getString("code").equals("SUCCESS")){ |
| | | if (jsonObject.getString("code").equals("SUCCESS")) { |
| | | bool = true; |
| | | }else{ |
| | | msg=jsonObject.getString("message"); |
| | | } else { |
| | | msg = jsonObject.getString("message"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("WMS完成"+invoke+"agv站点失败={}", response); |
| | | log.error("WMS完成" + invoke + "agv站点失败={}", response); |
| | | } finally { |
| | | apiLogService.save("WMS完成"+invoke+"agv站点"+sourceStaNo |
| | | apiLogService.save("WMS完成" + invoke + "agv站点" + sourceStaNo |
| | | , url + siteBindAndUnbing |
| | | , null |
| | | , "127.0.0.1" |
| | |
| | | ); |
| | | } |
| | | |
| | | if(bool){ |
| | | if (bool) { |
| | | return R.ok(); |
| | | }else { |
| | | } else { |
| | | return R.error(msg); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 空板回库或者拣料回库 |
| | | * |
| | | * @param sourceStaNo |
| | | * @param staNo |
| | | * @return |
| | | */ |
| | | @RequestMapping("/AGVStartReturn") |
| | | public synchronized R AGVStartReturn(@RequestParam(required = false) String sourceStaNo |
| | | ,@RequestParam(required = false) String staNo |
| | | ,@RequestParam(required = false) String taskNo){ |
| | | , @RequestParam(required = false) String staNo |
| | | , @RequestParam(required = false) String taskNo) { |
| | | if (Cools.isEmpty(sourceStaNo) || Cools.isEmpty(staNo)) { |
| | | return R.error("源站点和托盘码不能为空"); |
| | | |
| | | } |
| | | |
| | | R r=R.ok(); |
| | | R r = R.ok(); |
| | | |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", staNo).in("io_type",103,105,107)); |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", staNo).in("io_type", 103, 105, 107)); |
| | | if (wrkMast == null) { |
| | | r=FillEmptyPalletsStack(sourceStaNo,staNo); |
| | | }else { |
| | | if (wrkMast.getWrkSts()>30){ |
| | | r = FillEmptyPalletsStack(sourceStaNo, staNo); |
| | | } else { |
| | | if (wrkMast.getWrkSts() > 30) { |
| | | return R.error("该托盘={},没有下架,请下架后再回库!!!"); |
| | | } |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("sta_no", wrkMast.getStaNo()).in("io_type",101,103,105,107).lt("wrk_sts", 33)); |
| | | if (!Cools.isEmpty(wrkMasts)){ |
| | | return R.error(wrkMast.getCrnNo()+"堆垛机,有出库任务,禁止回库!!!"); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("sta_no", wrkMast.getStaNo()).in("io_type", 101, 103, 105, 107).lt("wrk_sts", 33)); |
| | | if (!Cools.isEmpty(wrkMasts)) { |
| | | return R.error(wrkMast.getCrnNo() + "堆垛机,有出库任务,禁止回库!!!"); |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String format = sdf.format(new Date()); |
| | | String s = format+"-" + wrkMast.getWrkNo() + "-" + wrkMast.getBarcode(); |
| | | r=SITESITEAGVMove(sourceStaNo,wrkMast.getStaNo$(),s); |
| | | String s = format + "-" + wrkMast.getWrkNo() + "-" + wrkMast.getBarcode(); |
| | | r = SITESITEAGVMove(sourceStaNo, wrkMast.getStaNo$(), s); |
| | | if (r.get("code").equals(200)) { |
| | | wrkMast.setPdcType(s); |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 获取仓库 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/ck") |
| | | @PostMapping |
| | | public R AGVStartReturn(){ |
| | | List<String> list=new ArrayList<>(); |
| | | public R AGVStartReturn() { |
| | | List<String> list = new ArrayList<>(); |
| | | list.add("半成品仓库"); |
| | | list.add("成品仓库"); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/mat/tiaoma/auth") |
| | | @ManagerAuth |
| | | public R find(@RequestParam("barcode") String barcode) { |
| | | ExdvYanbu barcode1 = exdMaterialMapper.getBacode(barcode); |
| | | if (barcode1 == null) { |
| | | return R.error("批次对应的验布数据不存在"); |
| | | } |
| | | return R.ok(barcode1); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getOrderNo/auth") |
| | | @ManagerAuth |
| | | public R findOrderNo(@RequestParam("orderNo") String orderNo) { |
| | | Page<Order> orderPage = orderService.selectPage(new Page<>(0, 10), new EntityWrapper<Order>().like("order_no", "%" + orderNo + "%")); |
| | | List<String> objects = new ArrayList<>(); |
| | | for (Order record : orderPage.getRecords()) { |
| | | objects.add(record.getOrderNo()); |
| | | } |
| | | return R.ok(objects); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.*; |
| | |
| | | |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty()).orElse(0.0D); |
| | | if (issued <= 0.0D) { continue; } |
| | | if (issued <= 0.0D) { |
| | | continue; |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist); |
| | | for (LocDetl locDetl : locDetls) { |
| | | if (issued > 0) { |
| | |
| | | List<TaskDto> taskDtos = new ArrayList<>(); |
| | | // 根据 (库位 & 出库站) 分组; 理想状态:一组为一次出库任务 |
| | | for (LocDto locDto : locDtos) { |
| | | if (locDto.isLack()) { continue; } |
| | | if (locDto.isLack()) { |
| | | continue; |
| | | } |
| | | TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getStaNo(), locDto); |
| | | if (TaskDto.has(taskDtos, taskDto)) { |
| | | TaskDto dto = TaskDto.find(taskDtos, taskDto); |
| | |
| | | } |
| | | // ----------------------------------------------------------------------------------------------- |
| | | for (TaskDto taskDto : taskDtos) { |
| | | workService.stockOut(null, taskDto, getUserId(), taskDto.getStaNo()); |
| | | workService.stockOut(null, taskDto, getUser(), taskDto.getStaNo()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/out/pakout2/preview/auth") |
| | | @ManagerAuth |
| | | public R pakoutPreview2(@RequestBody List<Long> ids) { |
| | | if (Cools.isEmpty(ids)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | List<OrderDetl> orderDetls = orderDetlService.selectBatchIds(ids); |
| | | List<LocDto> locDtos = new ArrayList<>(); |
| | | |
| | | Set<String> exist = new HashSet<>(); |
| | | |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | |
| | | List<LocDetl> locDetls = locDetlService.queryStockAll(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist); |
| | | for (LocDetl locDetl : locDetls) { |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), locDetl.getAnfme()); |
| | | List<String> staNos = new ArrayList<>(); |
| | | staNos.add("C1"); |
| | | staNos.add("C2"); |
| | | staNos.add("C3"); |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | exist.add(locDetl.getLocNo()); |
| | | } |
| | | } |
| | | return R.ok().add(locDtos); |
| | | } |
| | | |
| | | @PostMapping("/out/pakout2/auth") |
| | | @ManagerAuth(memo = "订单出库") |
| | | public synchronized R pakout2(@RequestBody List<LocDto> locDtos) throws InterruptedException { |
| | | if (Cools.isEmpty(locDtos)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | boolean lack = true; |
| | | for (LocDto locDto : locDtos) { |
| | | if (!locDto.isLack()) { |
| | | lack = false; |
| | | break; |
| | | } |
| | | } |
| | | if (lack) { |
| | | return R.error("库存不足"); |
| | | } |
| | | |
| | | Thread.sleep(1000L); |
| | | |
| | | |
| | | List<TaskDto> taskDtos = new ArrayList<>(); |
| | | // 根据 (库位 & 出库站) 分组; 理想状态:一组为一次出库任务 |
| | | for (LocDto locDto : locDtos) { |
| | | if (locDto.isLack()) { |
| | | continue; |
| | | } |
| | | TaskDto taskDto = new TaskDto(locDto.getLocNo(), locDto.getStaNo(), locDto); |
| | | if (TaskDto.has(taskDtos, taskDto)) { |
| | | TaskDto dto = TaskDto.find(taskDtos, taskDto); |
| | | assert dto != null; |
| | | dto.getLocDtos().addAll(taskDto.getLocDtos()); |
| | | } else { |
| | | taskDtos.add(taskDto); |
| | | } |
| | | } |
| | | // ----------------------------------------------------------------------------------------------- |
| | | for (TaskDto taskDto : taskDtos) { |
| | | workService.stockOutCheckAnfme(null, taskDto, getUser(), taskDto.getStaNo()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @RequestMapping("/plate/out/start") |
| | | @ManagerAuth(memo = "出库作业") |
| | | public R fullStoreTakeStart(@RequestBody StockOutParam param) { |
| | | workService.startupFullTakeStore(param, getUserId()); |
| | | workService.startupFullTakeStore(param, getUser()); |
| | | return R.ok("出库启动成功"); |
| | | } |
| | | |
| | |
| | | @RequestMapping("/locCheck/out/start") |
| | | @ManagerAuth(memo = "盘点出库") |
| | | public R locCheckOutStart(@RequestBody StockOutParam param) { |
| | | workService.locCheckOut(param, getUserId()); |
| | | workService.locCheckOut(param, getUser()); |
| | | return R.ok("出库启动成功"); |
| | | } |
| | | |
| | |
| | | |
| | | private String ck; |
| | | |
| | | private boolean type = false; |
| | | |
| | | |
| | | //agv状态 |
| | | /** |
| | | * 0:无需调用AGV |
| | |
| | | |
| | | List<LocDetl> queryStock(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos); |
| | | |
| | | |
| | | List<LocDetl> queryStockAll(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos); |
| | | |
| | | |
| | | List<LocDetl> queryStockOther(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos,@Param("locNo")String locNo); |
| | | |
| | | |
| | |
| | | |
| | | Mat selectByMatnr(@Param("matnr")String matnr); |
| | | |
| | | Mat selectBySku(@Param("sku")String sku); |
| | | |
| | | } |
| | |
| | | |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("workQty")Double workQty); |
| | | |
| | | |
| | | int increaseWorkQty2(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("workQty")Double workQty, @Param("color")String color); |
| | | |
| | | |
| | | int increaseWorkQtytest(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("anfme")Double anfme); |
| | | |
| | | } |
| | |
| | | |
| | | List<LocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos); |
| | | |
| | | |
| | | List<LocDetl> queryStockAll(String matnr, String batch, String orderNo, Set<String> locNos); |
| | | |
| | | |
| | | List<LocDetl> queryStockOther(String matnr, String batch, String orderNo, Set<String> locNos,String locNo); |
| | | |
| | | |
| | |
| | | |
| | | Mat selectByMatnr(String matnr); |
| | | |
| | | Mat selectBySku(String sku); |
| | | |
| | | } |
| | |
| | | /** |
| | | * 组托 |
| | | */ |
| | | void comb(CombParam param, Long userId); |
| | | void comb(CombParam param, Long userId, String fxId); |
| | | |
| | | /** |
| | | * 上架 |
| | |
| | | */ |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty); |
| | | |
| | | |
| | | boolean increaseWorkQty2(Long orderId, String matnr, String batch, Double workQty, String color); |
| | | |
| | | |
| | | boolean increaseWorkQtytest(String orderNo, String matnr, String batch, Double anfme); |
| | | } |
| | |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.model.enums.IoWorkType; |
| | | import com.zy.system.entity.User; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | /** |
| | | * 出库作业 |
| | | */ |
| | | void startupFullTakeStore(StockOutParam param, Long userId); |
| | | void startupFullTakeStore(StockOutParam param, User userId); |
| | | |
| | | /** |
| | | * 出库作业 |
| | |
| | | * @param locDetls 待出库物料 |
| | | * @param ioType 入出库类型 |
| | | */ |
| | | void stockOut(BasDevp staNo, List<LocDetlDto> locDetls, IoWorkType ioWorkType, Long userId,String agvStaNo); |
| | | void stockOut(BasDevp staNo, List<LocDetlDto> locDetls, IoWorkType ioWorkType, User user,String agvStaNo); |
| | | |
| | | void stockOut(BasDevp staNo, TaskDto taskDto, Long userId,String agvStaNo); |
| | | void stockOut(BasDevp staNo, TaskDto taskDto, User user, String agvStaNo); |
| | | |
| | | void stockOutCheckAnfme(BasDevp staNo, TaskDto taskDto, User user, String agvStaNo); |
| | | |
| | | |
| | | /** |
| | | * 空板入库 |
| | |
| | | /** |
| | | * 盘点出库 |
| | | */ |
| | | void locCheckOut(StockOutParam param, Long userId); |
| | | void locCheckOut(StockOutParam param, User userId); |
| | | |
| | | /** |
| | | * 库位移转 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<LocDetl> queryStockAll(String matnr, String batch, String orderNo, Set<String> locNos) { |
| | | return this.baseMapper.queryStockAll(matnr, batch, orderNo, locNos); |
| | | } |
| | | |
| | | @Override |
| | | public List<LocDetl> queryStockOther(String matnr, String batch, String orderNo, Set<String> locNos,String locNo) { |
| | | return this.baseMapper.queryStockOther(matnr, batch, orderNo, locNos,locNo); |
| | | } |
| | |
| | | return this.baseMapper.selectByMatnr(matnr); |
| | | } |
| | | |
| | | @Override |
| | | public Mat selectBySku(String matnr) { |
| | | return this.baseMapper.selectBySku(matnr); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.*; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.DetlDto; |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void comb(CombParam param, Long userId) { |
| | | public void comb(CombParam param, Long userId, String fxId) { |
| | | if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | |
| | | throw new CoolException(param.getBarcode() + "数据组托档中已存在"); |
| | | } |
| | | |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode())); |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode())); |
| | | // int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode()) |
| | | // .last(" wrk_no IN ( SELECT wrk_no FROM asr_wrk_mast WHERE wrk_sts != 15 )")); |
| | | |
| | | if (countLoc > 0 ) { |
| | | if (countLoc > 0) { |
| | | throw new CoolException("库存条码数据已存在===>>" + param.getBarcode()); |
| | | } |
| | | if (countWrk > 0) { |
| | |
| | | Date now = new Date(); |
| | | |
| | | //进行批号筛选,批号只能唯一 |
| | | Set<String> batchs=new HashSet<>(); |
| | | List<String> strings=new ArrayList<>(); |
| | | Set<String> batchs = new HashSet<>(); |
| | | List<String> strings = new ArrayList<>(); |
| | | |
| | | |
| | | for(CombParam.CombMat mat : param.getCombMats()){ |
| | | if(Cools.isEmpty(mat.getBatch())){ |
| | | for (CombParam.CombMat mat : param.getCombMats()) { |
| | | if (Cools.isEmpty(mat.getBatch())) { |
| | | continue; |
| | | } |
| | | batchs.add(mat.getBatch()); |
| | |
| | | WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("batch", mat.getBatch())); |
| | | WrkDetl batch = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("batch", mat.getBatch())); |
| | | LocDetl batch1 = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("batch", mat.getBatch())); |
| | | if(!Cools.isEmpty(batch)||!Cools.isEmpty(batch1)||!Cools.isEmpty(waitPakin)){ |
| | | throw new CoolException("该物料批号"+mat.getBatch()+"已在入库通知档、任务明细和库存中存在"); |
| | | if (!Cools.isEmpty(batch) || !Cools.isEmpty(batch1) || !Cools.isEmpty(waitPakin)) { |
| | | throw new CoolException("该物料批号" + mat.getBatch() + "已在入库通知档、任务明细和库存中存在"); |
| | | } |
| | | } |
| | | if(batchs.size()<strings.size()){ |
| | | if (batchs.size() < strings.size()) { |
| | | throw new CoolException("有重复的物料批号"); |
| | | } |
| | | int i =1; |
| | | int i = 1; |
| | | // 无单组托 |
| | | if (Cools.isEmpty(param.getOrderNo())) { |
| | | |
| | |
| | | |
| | | for (DetlDto detlDto : detlDtos) { |
| | | Mat mat = matService.selectByMatnr(detlDto.getMatnr()); |
| | | if (Cools.isEmpty(detlDto.getBatch())){ |
| | | if (Cools.isEmpty(detlDto.getBatch())) { |
| | | detlDto.setBatch(""); |
| | | } |
| | | if (Cools.isEmpty(mat)) { |
| | |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setModiTime(now); |
| | | waitPakin.setBrand(param.getCk());//仓库 |
| | | if(i==1){ |
| | | waitPakin.setInspect(param.isType() ? 1 : 0); |
| | | if (i == 1) { |
| | | // 0:不需要补空托盘 |
| | | // 1:小托盘 |
| | | // 2:大托盘 |
| | |
| | | waitPakin.setSuppCode(param.getBarcode()); |
| | | } |
| | | i++; |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | | } |
| | | // 关联组托 |
| | | // 关联组托 |
| | | } else { |
| | | Order order = orderService.selectByNo(param.getOrderNo()); |
| | | if (order.getSettle() > 2) { |
| | |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | | // 修改订单作业数量 |
| | | if (!orderDetlService.increaseWorkQty(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme())) { |
| | | if (!orderDetlService.increaseWorkQty2(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme(), fxId)) { |
| | | throw new CoolException("修改单据作业数量失败"); |
| | | } |
| | | |
| | |
| | | waitPakin.setAppeTime(now); |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setModiTime(now); |
| | | if(i==1){ |
| | | waitPakin.setBrand(param.getCk());//仓库 |
| | | waitPakin.setInspect(param.isType() ? 1 : 0); |
| | | if (i == 1) { |
| | | // 0:不需要补空托盘 |
| | | // 1:小托盘 |
| | | // 2:大托盘 |
| | |
| | | } |
| | | |
| | | // 获取商品列表 |
| | | for(CombParam.CombMat combMat : param.getCombMats()){ |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | Mat mat = matService.selectByMatnr(combMat.getMatnr()); |
| | | if (Cools.isEmpty(mat)){ |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(combMat.getMatnr() + ":商品档案不存在!"); |
| | | } |
| | | if (Cools.isEmpty(combMat.getAnfme()) || combMat.getAnfme()==0){ |
| | | if (Cools.isEmpty(combMat.getAnfme()) || combMat.getAnfme() == 0) { |
| | | throw new CoolException(combMat.getMatnr() + ":商品数量有误!"); |
| | | } |
| | | if (Cools.isEmpty(combMat.getBatch())){ |
| | | if (Cools.isEmpty(combMat.getBatch())) { |
| | | // throw new CoolException(combMat.getMatnr() + ":商品批号有误!"); |
| | | } |
| | | ManLocDetl manLocDetl = new ManLocDetl(); |
| | |
| | | @Override |
| | | public void offSale(OffSaleParam offSaleParam) { |
| | | ManLocDetl manLocDetl = manLocDetlMapper.selectLocNo0(offSaleParam.getLocNo(), offSaleParam.getMatnr()); |
| | | if (Cools.isEmpty(manLocDetl)){ |
| | | if (Cools.isEmpty(manLocDetl)) { |
| | | throw new CoolException("无此商品!"); |
| | | } |
| | | double anfme = manLocDetl.getAnfme() - offSaleParam.getAnfme(); |
| | | if (anfme < 0) { |
| | | throw new CoolException("商品库存不足!"); |
| | | } else if (anfme == 0){ |
| | | } else if (anfme == 0) { |
| | | manLocDetlMapper.deleteLocNo0(offSaleParam.getLocNo(), offSaleParam.getMatnr()); |
| | | } |
| | | manLocDetlMapper.updateAnfme0(anfme,manLocDetl.getNodeId()); |
| | | manLocDetlMapper.updateAnfme0(anfme, manLocDetl.getNodeId()); |
| | | } |
| | | |
| | | // 查找商品 |
| | |
| | | |
| | | // 添加明细 |
| | | for (WrkDetl wrkDetl : list) { |
| | | if (wrkDetl.getAnfme() == 0.0D) { continue; } |
| | | if (wrkDetl.getAnfme() == 0.0D) { |
| | | continue; |
| | | } |
| | | // todo 盘点记录、保存调整记录 |
| | | String orderNo = wrkDetl.getOrderNo(); |
| | | Mat mat = matService.selectByMatnr(wrkDetl.getMatnr()); |
| | |
| | | } |
| | | |
| | | // 修改盘点任务主档状态 |
| | | wrkMast.setFullPlt(wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()).size() != 0?"Y":"N"); |
| | | wrkMast.setFullPlt(wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()).size() != 0 ? "Y" : "N"); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | success = true; |
| | | } else if (jsonObject.getInteger("code").equals(500)) { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response); |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL + MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response); |
| | | throw new CoolException(jsonObject.getString("msg")); |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response); |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL + MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response); |
| | | throw new CoolException("上报mes系统失败"); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | } catch (Exception e) { |
| | | log.error("", e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | BasDevp sta = basDevpService.checkSiteStatus(staNo); |
| | | //根据订单号生成出库任务工作档 |
| | | Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no", orderNo)); |
| | | if (order.getSettle() != 1 && order.getSettle() != 2){ |
| | | if (order.getSettle() != 1 && order.getSettle() != 2) { |
| | | throw new CoolException("该订单已处理"); |
| | | } |
| | | |
| | | List<OrderDetl> orderDetls = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no", orderNo)); |
| | | Date now = new Date(); |
| | | for(OrderDetl orderDetl : orderDetls){ |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | //查询所有库位状态为F的库位信息 |
| | | List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(),orderDetl.getBatch(),null,null); |
| | | List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, null); |
| | | if (locDetls.size() == 0) { |
| | | throw new CoolException("库存中没有该物料"); |
| | | } |
| | | for(LocDetl locDetl : locDetls){ |
| | | for (LocDetl locDetl : locDetls) { |
| | | //如果该库位出库路线所用的堆垛机out_enable不为Y,跳过该循环 |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", locDetl.getLocNo())); |
| | |
| | | } |
| | | BasCrnp crn_no = basCrnpService.selectOne(new EntityWrapper<BasCrnp>() |
| | | .eq("crn_no", locMast.getCrnNo())); |
| | | if (Cools.isEmpty(crn_no) || !crn_no.getOutEnable().equals("Y")){ |
| | | if (Cools.isEmpty(crn_no) || !crn_no.getOutEnable().equals("Y")) { |
| | | continue; |
| | | } |
| | | |
| | | //可出库数量 = 订单数量 - 作业中数量 |
| | | Double outQty = orderDetl.getAnfme() - orderDetl.getWorkQty(); |
| | | if(outQty <= 0){ |
| | | if (outQty <= 0) { |
| | | break; |
| | | } |
| | | // 判断入出库类型:101.全板出库 or 103.拣料出库 |
| | |
| | | order.setSettle(2L); |
| | | order.setUpdateBy(userId); |
| | | order.setUpdateTime(now); |
| | | if(!orderService.update(order, new EntityWrapper<Order>().eq("order_no", orderNo))){ |
| | | if (!orderService.update(order, new EntityWrapper<Order>().eq("order_no", orderNo))) { |
| | | throw new CoolException("更新订单状态失败"); |
| | | } |
| | | orderDetl.setWorkQty(orderDetl.getWorkQty() + curOutQty); |
| | | orderDetl.setUpdateBy(userId); |
| | | orderDetl.setUpdateTime(now); |
| | | Wrapper wrapper = new EntityWrapper<OrderDetl>().eq("order_no", orderNo) |
| | | .eq("matnr",orderDetl.getMatnr()); |
| | | if(!Cools.isEmpty(orderDetl.getBatch())){ |
| | | .eq("matnr", orderDetl.getMatnr()); |
| | | if (!Cools.isEmpty(orderDetl.getBatch())) { |
| | | wrapper.eq("batch", orderDetl.getBatch()); |
| | | } |
| | | if(!orderDetlService.update(orderDetl, wrapper)){ |
| | | if (!orderDetlService.update(orderDetl, wrapper)) { |
| | | throw new CoolException("更新订单明细失败"); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | /** |
| | | * 入出库任务生成时,更新单据表中作业数量 |
| | | * |
| | | * @param orderId |
| | | * @param matnr |
| | | * @param batch |
| | |
| | | |
| | | /** |
| | | * 入出库任务生成时,更新单据表中作业数量 |
| | | * |
| | | * @param orderId |
| | | * @param matnr |
| | | * @param batch |
| | | * @param workQty |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean increaseWorkQty2(Long orderId, String matnr, String batch, Double workQty, String color) { |
| | | return this.baseMapper.increaseWorkQty2(orderId, matnr, batch, workQty, color) > 0; |
| | | } |
| | | |
| | | /** |
| | | * 入出库任务生成时,更新单据表中作业数量 |
| | | * |
| | | * @param orderNo |
| | | * @param matnr |
| | | * @param batch |
| | |
| | | import com.zy.common.properties.SlaveProperties; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.web.WcsController; |
| | | import com.zy.system.entity.User; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | sourceStaNo.setWrkNo(workNo); |
| | | sourceStaNo.setModiUser(userId); |
| | | sourceStaNo.setModiTime(now); |
| | | if (!basDevpService.updateById(sourceStaNo)){ |
| | | if (!basDevpService.updateById(sourceStaNo)) { |
| | | throw new CoolException("更新源站失败"); |
| | | } |
| | | // 更新目标库位状态 |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | if (locMast.getLocSts().equals("O")){ |
| | | if (locMast.getLocSts().equals("O")) { |
| | | locMast.setLocSts("S"); // S.入库预约 |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)){ |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("改变库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException(dto.getLocNo()+"目标库位已被占用"); |
| | | throw new CoolException(dto.getLocNo() + "目标库位已被占用"); |
| | | } |
| | | return dto.getLocNo(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void startupFullTakeStore(StockOutParam param, Long userId) { |
| | | public void startupFullTakeStore(StockOutParam param, User userId) { |
| | | String agvStaNo = param.getOutSite(); |
| | | // 获取库位明细 |
| | | List<LocDetlDto> locDetlDtos = new ArrayList<>(); |
| | |
| | | if (!locDetlDtos.isEmpty()) { |
| | | |
| | | // 启动出库开始 101.出库 |
| | | stockOut(null, locDetlDtos, null, userId,agvStaNo); |
| | | stockOut(null, locDetlDtos, null, userId, agvStaNo); |
| | | } else { |
| | | throw new CoolException("库存不存在"); |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void stockOut(BasDevp staNo, List<LocDetlDto> locDetlDtos, IoWorkType ioWorkType, Long userId,String agvStaNo) { |
| | | public void stockOut(BasDevp staNo, List<LocDetlDto> locDetlDtos, IoWorkType ioWorkType, User user, String agvStaNo) { |
| | | Date now = new Date(); |
| | | // 合并同类项 |
| | | Set<String> locNos = new HashSet<>(); |
| | |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException(dto.getLocNo()+"库位不存在"); |
| | | throw new CoolException(dto.getLocNo() + "库位不存在"); |
| | | } |
| | | if(!locMast.getLocSts().equals("F")){ |
| | | throw new CoolException(dto.getLocNo()+"托盘非在库状态"); |
| | | if (!locMast.getLocSts().equals("F")) { |
| | | throw new CoolException(dto.getLocNo() + "托盘非在库状态"); |
| | | } |
| | | Integer outSta = 0; |
| | | if(locMast.getCrnNo()==1){ |
| | | if (locMast.getCrnNo() == 1) { |
| | | outSta = 105; |
| | | }else if(locMast.getCrnNo()==2){ |
| | | } else if (locMast.getCrnNo() == 2) { |
| | | outSta = 103; |
| | | }else if(locMast.getCrnNo()==3){ |
| | | } else if (locMast.getCrnNo() == 3) { |
| | | outSta = 101; |
| | | } |
| | | |
| | |
| | | wrkMast.setEmptyMk("N"); // 空板 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setBarcode(locMast.getBarcode()); |
| | | wrkMast.setAppeUser(userId); // 操作人员数据 |
| | | wrkMast.setAppeUser(user.getId()); // 操作人员数据 |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiUser(user.getId()); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setMemo(Cools.isEmpty(agvStaNo) ? "" : agvStaNo); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | throw new CoolException("保存工作档失败,出库库位号:"+dto.getLocNo()); |
| | | throw new CoolException("保存工作档失败,出库库位号:" + dto.getLocNo()); |
| | | } |
| | | // 生成工作档明细 |
| | | for (LocDetlDto detlDto : dto.getLocDetlDtos()) { |
| | | if (detlDto.getCount()==null || detlDto.getCount() <= 0.0D) {continue;} |
| | | if (detlDto.getCount() == null || detlDto.getCount() <= 0.0D) { |
| | | continue; |
| | | } |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(detlDto.getLocDetl()); |
| | | wrkDetl.setOrderNo(""); // 手动出库不需要带出库存中的单据编号 |
| | | wrkDetl.setWrkNo(workNo); |
| | | wrkDetl.setIoTime(now); |
| | | Double anfme = ioType==101?detlDto.getLocDetl().getAnfme():detlDto.getCount(); |
| | | Double anfme = ioType == 101 ? detlDto.getLocDetl().getAnfme() : detlDto.getCount(); |
| | | wrkDetl.setAnfme(anfme); // 数量 |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setAppeUser(userId); |
| | | wrkDetl.setAppeUser(user.getId()); |
| | | wrkDetl.setModiTime(now); |
| | | wrkDetl.setModiUser(userId); |
| | | wrkDetl.setModiUser(user.getId()); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(dto.getLocNo()); |
| | | if (locMast.getLocSts().equals("F")) { |
| | | locMast.setLocSts(ioType==101?"R":"P"); |
| | | locMast.setModiUser(userId); |
| | | locMast.setLocSts(ioType == 101 ? "R" : "P"); |
| | | locMast.setModiUser(user.getId()); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("预约库位状态失败,库位号:"+dto.getLocNo()); |
| | | throw new CoolException("预约库位状态失败,库位号:" + dto.getLocNo()); |
| | | } |
| | | } else { |
| | | throw new CoolException(dto.getLocNo() + "库位不是在库状态"); |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void stockOut(BasDevp staNo, TaskDto taskDto, Long userId,String agvStaNo) { |
| | | public void stockOut(BasDevp staNo, TaskDto taskDto, User user, String agvStaNo) { |
| | | Date now = new Date(); |
| | | List<LocDto> locDtos = taskDto.getLocDtos(); |
| | | for (LocDto locDto : locDtos) { |
| | |
| | | // 获取路径 |
| | | int ioType = taskDto.isAll() ? 101 : 103; |
| | | Integer outSta = 0; |
| | | if(locMast.getCrnNo()==1){ |
| | | if (locMast.getCrnNo() == 1) { |
| | | outSta = 106; |
| | | }else if(locMast.getCrnNo()==2){ |
| | | } else if (locMast.getCrnNo() == 2) { |
| | | outSta = 104; |
| | | }else if(locMast.getCrnNo()==3){ |
| | | } else if (locMast.getCrnNo() == 3) { |
| | | outSta = 102; |
| | | } |
| | | |
| | | StaDesc staDesc = staDescService.queryCrnStnAuto(ioType, locMast.getCrnNo(),outSta); |
| | | StaDesc staDesc = staDescService.queryCrnStnAuto(ioType, locMast.getCrnNo(), outSta); |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); |
| | | // 生成工作档 |
| | |
| | | wrkMast.setEmptyMk("N"); // 空板 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setBarcode(locMast.getBarcode()); |
| | | wrkMast.setAppeUser(userId); // 操作人员数据 |
| | | wrkMast.setAppeUser(user.getId()); // 操作人员数据 |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiUser(user.getId()); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setMemo(Cools.isEmpty(agvStaNo) ? "" : agvStaNo); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | throw new CoolException("保存工作档失败,出库库位号:"+taskDto.getLocNo()); |
| | | throw new CoolException("保存工作档失败,出库库位号:" + taskDto.getLocNo()); |
| | | } |
| | | // 生成工作档明细 |
| | | for (LocDto locDto : taskDto.getLocDtos()) { |
| | | if (locDto.getAnfme()==null || locDto.getAnfme() <= 0.0D) { continue; } |
| | | if (locDto.getAnfme() == null || locDto.getAnfme() <= 0.0D) { |
| | | continue; |
| | | } |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | } |
| | | Mat mat=matService.selectOne(new EntityWrapper<Mat>().eq("matnr",locDto.getMatnr())); |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", locDto.getMatnr())); |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(orderDetl); |
| | | wrkDetl.setZpallet(wrkMast.getBarcode()); |
| | |
| | | wrkDetl.setModel(mat.getModel()); |
| | | wrkDetl.setAnfme(locDto.getAnfme()); // 数量 |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setAppeUser(userId); |
| | | wrkDetl.setAppeUser(user.getId()); |
| | | wrkDetl.setModiTime(now); |
| | | wrkDetl.setModiUser(userId); |
| | | wrkDetl.setModiUser(user.getId()); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | // 修改订单明细 |
| | | if (!orderDetlService.increaseWorkQty(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) { |
| | | if (!orderDetlService.increaseWorkQty2(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme(), user.getEmail())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, user.getId()); |
| | | } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(taskDto.getLocNo()); |
| | | if (locMast.getLocSts().equals("F")) { |
| | | locMast.setLocSts(ioType==101?"R":"P"); |
| | | locMast.setModiUser(userId); |
| | | locMast.setLocSts(ioType == 101 ? "R" : "P"); |
| | | locMast.setModiUser(user.getId()); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("预约库位状态失败,库位号:"+taskDto.getLocNo()); |
| | | throw new CoolException("预约库位状态失败,库位号:" + taskDto.getLocNo()); |
| | | } |
| | | } else { |
| | | throw new CoolException(taskDto.getLocNo() + "库位不是在库状态"); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void stockOutCheckAnfme(BasDevp staNo, TaskDto taskDto, User user, String agvStaNo) { |
| | | Date now = new Date(); |
| | | List<LocDto> locDtos = taskDto.getLocDtos(); |
| | | for (LocDto locDto : locDtos) { |
| | | if (!taskDto.getLocNo().equals(locDto.getLocNo()) && !taskDto.getStaNo().equals(locDto.getStaNo())) { |
| | | throw new CoolException("订单出库异常,请联系管理员"); |
| | | } |
| | | } |
| | | // 获取库位 |
| | | LocMast locMast = locMastService.selectById(taskDto.getLocNo()); |
| | | for (LocDto locDto : taskDto.getLocDtos()) { |
| | | if (locDto.getAnfme() == null || locDto.getAnfme() <= 0.0D) { |
| | | continue; |
| | | } |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | } |
| | | if (orderDetl.getAnfme() - orderDetl.getWorkQty() == 0) { |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | | // 获取路径 |
| | | int ioType = taskDto.isAll() ? 101 : 103; |
| | | Integer outSta = 0; |
| | | if (locMast.getCrnNo() == 1) { |
| | | outSta = 106; |
| | | } else if (locMast.getCrnNo() == 2) { |
| | | outSta = 104; |
| | | } else if (locMast.getCrnNo() == 3) { |
| | | outSta = 102; |
| | | } |
| | | |
| | | StaDesc staDesc = staDescService.queryCrnStnAuto(ioType, locMast.getCrnNo(), outSta); |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(ioType); // 入出库状态 |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | wrkMast.setCrnNo(locMast.getCrnNo()); |
| | | wrkMast.setSourceStaNo(staDesc.getCrnStn()); // 源站 |
| | | wrkMast.setStaNo(staDesc.getStnNo()); // 目标站 |
| | | wrkMast.setSourceLocNo(taskDto.getLocNo()); // 源库位 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk("N"); // 空板 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setBarcode(locMast.getBarcode()); |
| | | wrkMast.setAppeUser(user.getId()); // 操作人员数据 |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(user.getId()); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setMemo(Cools.isEmpty(agvStaNo) ? "" : agvStaNo); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | throw new CoolException("保存工作档失败,出库库位号:" + taskDto.getLocNo()); |
| | | } |
| | | // 生成工作档明细 |
| | | for (LocDto locDto : taskDto.getLocDtos()) { |
| | | if (locDto.getAnfme() == null || locDto.getAnfme() <= 0.0D) { |
| | | continue; |
| | | } |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | } |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", locDto.getMatnr())); |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(orderDetl); |
| | | wrkDetl.setZpallet(wrkMast.getBarcode()); |
| | | wrkDetl.setIoTime(now); |
| | | wrkDetl.setWrkNo(workNo); |
| | | wrkDetl.setBatch(locDto.getBatch()); |
| | | wrkDetl.setOrderNo(locDto.getOrderNo()); |
| | | wrkDetl.setModel(mat.getModel()); |
| | | wrkDetl.setAnfme(locDto.getAnfme() > (orderDetl.getAnfme() - orderDetl.getWorkQty()) ? (orderDetl.getAnfme() - orderDetl.getWorkQty()) : locDto.getAnfme()); // 数量 |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setAppeUser(user.getId()); |
| | | wrkDetl.setModiTime(now); |
| | | wrkDetl.setModiUser(user.getId()); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | // 修改订单明细 |
| | | if (!orderDetlService.increaseWorkQty2(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), wrkDetl.getAnfme(), user.getEmail())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, user.getId()); |
| | | } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(taskDto.getLocNo()); |
| | | if (locMast.getLocSts().equals("F")) { |
| | | locMast.setLocSts(ioType == 101 ? "R" : "P"); |
| | | locMast.setModiUser(user.getId()); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("预约库位状态失败,库位号:" + taskDto.getLocNo()); |
| | | } |
| | | } else { |
| | | throw new CoolException(taskDto.getLocNo() + "库位不是在库状态"); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | sourceStaNo.setWrkNo(workNo); |
| | | sourceStaNo.setModiUser(userId); |
| | | sourceStaNo.setModiTime(now); |
| | | if (!basDevpService.updateById(sourceStaNo)){ |
| | | if (!basDevpService.updateById(sourceStaNo)) { |
| | | throw new CoolException("更新源站失败"); |
| | | } |
| | | // 更新目标库位状态 |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | if (locMast.getLocSts().equals("O")){ |
| | | if (locMast.getLocSts().equals("O")) { |
| | | locMast.setLocSts("S"); // S.入库预约 |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)){ |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("改变库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException(dto.getLocNo()+"目标库位已被占用"); |
| | | throw new CoolException(dto.getLocNo() + "目标库位已被占用"); |
| | | } |
| | | return dto.getLocNo(); |
| | | } |
| | |
| | | // 获取库位 |
| | | LocMast locMast = locMastService.selectById(locNo); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException(locNo+"库位不存在"); |
| | | throw new CoolException(locNo + "库位不存在"); |
| | | } |
| | | if(!locMast.getLocSts().equals("D")){ |
| | | throw new CoolException(locNo+"托盘非在库状态"); |
| | | if (!locMast.getLocSts().equals("D")) { |
| | | throw new CoolException(locNo + "托盘非在库状态"); |
| | | } |
| | | // 获取源站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | |
| | | throw new CoolException("保存工作档失败"); |
| | | } |
| | | // 更新库位状态 D.空板 -> R.出库预约 |
| | | if (locMast.getLocSts().equals("D")){ |
| | | if (locMast.getLocSts().equals("D")) { |
| | | locMast.setLocSts("R"); |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(now); |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void locCheckOut(StockOutParam param, Long userId) { |
| | | public void locCheckOut(StockOutParam param, User userId) { |
| | | |
| | | // 获取库位明细 |
| | | List<LocDetlDto> locDetlDtos = new ArrayList<>(); |
| | |
| | | } |
| | | if (!locDetlDtos.isEmpty()) { |
| | | // 启动出库开始 107.盘点出库 |
| | | stockOut(null, locDetlDtos, IoWorkType.CHECK_OUT, userId,null); |
| | | stockOut(null, locDetlDtos, IoWorkType.CHECK_OUT, userId, null); |
| | | } else { |
| | | throw new CoolException("库位物料不存在"); |
| | | } |
| | |
| | | public void locMove(String sourceLocNo, String locNo, Long userId) { |
| | | LocMast sourceLoc = locMastService.selectById(sourceLocNo); |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo)); |
| | | if (Cools.isEmpty(sourceLoc)){ |
| | | if (Cools.isEmpty(sourceLoc)) { |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | LocMast loc = locMastService.selectById(locNo); |
| | | if (Cools.isEmpty(loc)){ |
| | | if (Cools.isEmpty(loc)) { |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | if (!sourceLoc.getCrnNo().equals(loc.getCrnNo())) { |
| | |
| | | wrkMast.setCrnNo(sourceLoc.getCrnNo()); |
| | | wrkMast.setSourceLocNo(sourceLocNo); // 源库位 |
| | | wrkMast.setLocNo(locNo); // 目标库位 |
| | | wrkMast.setFullPlt(Cools.isEmpty(locDetls)?"N":"Y"); // 满板:Y |
| | | wrkMast.setFullPlt(Cools.isEmpty(locDetls) ? "N" : "Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk(sourceLoc.getLocSts().equals("D")?"Y":"N"); // 空板 |
| | | wrkMast.setEmptyMk(sourceLoc.getLocSts().equals("D") ? "Y" : "N"); // 空板 |
| | | wrkMast.setBarcode(sourceLoc.getBarcode()); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setAppeUser(userId); |
| | |
| | | sourceLoc.setLocSts("R"); // R.出库预约 |
| | | sourceLoc.setModiUser(userId); |
| | | sourceLoc.setModiTime(now); |
| | | if (!locMastService.updateById(sourceLoc)){ |
| | | if (!locMastService.updateById(sourceLoc)) { |
| | | throw new CoolException("更新源库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("源库位出库失败,状态:"+sourceLoc.getLocSts$()); |
| | | throw new CoolException("源库位出库失败,状态:" + sourceLoc.getLocSts$()); |
| | | } |
| | | // 修改目标库位状态 |
| | | if (loc.getLocSts().equals("O")) { |
| | |
| | | throw new CoolException("更新目标库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("移转失败,目标库位状态:"+loc.getLocSts$()); |
| | | throw new CoolException("移转失败,目标库位状态:" + loc.getLocSts$()); |
| | | } |
| | | } |
| | | |
| | |
| | | @Transactional |
| | | public void completeWrkMast(String workNo, Long userId) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException(workNo+"工作档不存在"); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(workNo + "工作档不存在"); |
| | | } |
| | | if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 14) { |
| | | throw new CoolException("当前工作档已完成"); |
| | | } |
| | | // 入库 + 库位转移 |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()==11)) { |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType() == 11)) { |
| | | wrkMast.setWrkSts(4L); |
| | | // 出库 |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | | wrkMast.setWrkSts(14L); |
| | | } |
| | |
| | | Iterator<LocDetlAdjustParam.LocDetlAdjust> iterator1 = list.iterator(); |
| | | while (iterator1.hasNext()) { |
| | | LocDetlAdjustParam.LocDetlAdjust adjust = iterator1.next(); |
| | | if (adjust.getCount() == 0) { continue; } |
| | | if (adjust.getCount() == 0) { |
| | | continue; |
| | | } |
| | | if (locDetl.getMatnr().equals(adjust.getMatnr()) && Cools.eq(locDetl.getBatch(), adjust.getBatch())) { |
| | | if (!locDetl.getAnfme().equals(adjust.getCount())) { |
| | | // todo 盘点记录 |
| | |
| | | |
| | | // 添加库存 |
| | | for (LocDetlAdjustParam.LocDetlAdjust adjust : list) { |
| | | if (adjust.getCount() == 0.0D) { continue; } |
| | | if (adjust.getCount() == 0.0D) { |
| | | continue; |
| | | } |
| | | Mat mat = matService.selectByMatnr(adjust.getMatnr()); |
| | | LocDetl locDetl = new LocDetl(); |
| | | locDetl.sync(mat); |
| | |
| | | public void cancelWrkMast(String workNo, Long userId) { |
| | | Date now = new Date(); |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException(workNo+"工作档不存在"); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(workNo + "工作档不存在"); |
| | | } |
| | | String locNo = ""; // 待修改目标库位 |
| | | String locSts = ""; // 待修改目标库位状态 |
| | |
| | | // 库位转移:源库位 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("取消库位转移失败,源库位不存在:"+ wrkMast.getSourceLocNo()); |
| | | throw new CoolException("取消库位转移失败,源库位不存在:" + wrkMast.getSourceLocNo()); |
| | | } |
| | | locMast.setLocSts(wrkMast.getFullPlt().equalsIgnoreCase("N")?"D":"F"); |
| | | locMast.setLocSts(wrkMast.getFullPlt().equalsIgnoreCase("N") ? "D" : "F"); |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(userId); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | // 出库取消(修改源库位) |
| | | // 出库取消(修改源库位) |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) { |
| | | locNo = wrkMast.getSourceLocNo(); |
| | | // 出库 ===>> F.在库 |
| | | if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) { |
| | | locSts = "F"; |
| | | // 空板出库 ===>> D.空桶/空栈板 |
| | | // 空板出库 ===>> D.空桶/空栈板 |
| | | } else if (wrkMast.getIoType() == 110) { |
| | | locSts = "D"; |
| | | // 库位转移 ===>> D.空桶/空栈板 |
| | | // 库位转移 ===>> D.空桶/空栈板 |
| | | } else if (wrkMast.getIoType() == 11) { |
| | | locSts = wrkMast.getFullPlt().equalsIgnoreCase("N")?"D":"F"; |
| | | locSts = wrkMast.getFullPlt().equalsIgnoreCase("N") ? "D" : "F"; |
| | | // 库位转移:目标库位 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("取消库位转移失败,目标库位不存在:"+ wrkMast.getSourceLocNo()); |
| | | throw new CoolException("取消库位转移失败,目标库位不存在:" + wrkMast.getSourceLocNo()); |
| | | } |
| | | locMast.setLocSts("O"); |
| | | locMast.setModiTime(now); |
| | |
| | | } |
| | | |
| | | //取消入库工作档时,查询组托表,如果有将状态改为待处理 |
| | | if(wrkMast.getIoType() == 1) { |
| | | List<WaitPakin> waitPakins=waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | for (WaitPakin waitPakin:waitPakins){ |
| | | if (wrkMast.getIoType() == 1) { |
| | | List<WaitPakin> waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | for (WaitPakin waitPakin : waitPakins) { |
| | | if (!Cools.isEmpty(waitPakin)) { |
| | | waitPakin.setIoStatus("N"); |
| | | waitPakin.setLocNo(""); |
| | |
| | | } |
| | | |
| | | //取消出库工作档时,查询单据管理表,回滚作业中数量 |
| | | if(wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103) { |
| | | if (wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | //字符串不为空 |
| | |
| | | |
| | | //修改订单主表状态,没有作业数量时才可以修改 |
| | | boolean flag = true; |
| | | List<OrderDetl> orderDetls = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no",wrkDetl.getOrderNo())); |
| | | for(OrderDetl orderDetl : orderDetls){ |
| | | if(orderDetl.getWorkQty() > 0){ |
| | | List<OrderDetl> orderDetls = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no", wrkDetl.getOrderNo())); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | if (orderDetl.getWorkQty() > 0) { |
| | | flag = false; |
| | | } |
| | | } |
| | | if(flag){ |
| | | Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no",wrkDetl.getOrderNo())); |
| | | if(!Cools.isEmpty(order) && order.getSettle()==2){ |
| | | if (flag) { |
| | | Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no", wrkDetl.getOrderNo())); |
| | | if (!Cools.isEmpty(order) && order.getSettle() == 2) { |
| | | order.setSettle(1L); |
| | | order.setUpdateBy(userId); |
| | | order.setUpdateTime(now); |
| | | } |
| | | if(!orderService.update(order,new EntityWrapper<Order>().eq("order_no",wrkDetl.getOrderNo()))){ |
| | | if (!orderService.update(order, new EntityWrapper<Order>().eq("order_no", wrkDetl.getOrderNo()))) { |
| | | throw new CoolException("修改订单状态失败"); |
| | | } |
| | | } |
| | |
| | | // 修改库位状态 |
| | | LocMast locMast = locMastService.selectById(locNo); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("取消工作档失败,库位不存在:"+ locNo); |
| | | throw new CoolException("取消工作档失败,库位不存在:" + locNo); |
| | | } |
| | | locMast.setLocSts(locSts); |
| | | locMast.setModiTime(now); |
| | |
| | | @Transactional |
| | | public void pickWrkMast(String workNo, Long userId) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException(workNo+"工作档不存在"); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(workNo + "工作档不存在"); |
| | | } |
| | | // 入出库类型判断 |
| | | if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107) { |
| | |
| | | // 目标库位 |
| | | LocMast targetLoc = null; |
| | | |
| | | for (int curRow = rowLastno.getsRow(); curRow<=rowLastno.geteRow(); curRow++) { |
| | | for (int curRow = rowLastno.getsRow(); curRow <= rowLastno.geteRow(); curRow++) { |
| | | |
| | | if (Utils.isShallowLoc(slaveProperties, curRow)) { |
| | | Integer deepRow = Utils.getDeepRow(slaveProperties, curRow); |
| | |
| | | throw new CoolException("修改工作档失败"); |
| | | } |
| | | // 修改库位状态 O ===>>> S |
| | | if (targetLoc.getLocSts().equals("O")){ |
| | | if (targetLoc.getLocSts().equals("O")) { |
| | | targetLoc.setLocSts("S"); // S.入库预约 |
| | | targetLoc.setModiUser(userId); |
| | | targetLoc.setModiTime(now); |
| | | if (!locMastService.updateById(targetLoc)){ |
| | | if (!locMastService.updateById(targetLoc)) { |
| | | throw new CoolException("改变库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException(targetLoc.getLocNo()+"目标库位已被占用"); |
| | | throw new CoolException(targetLoc.getLocNo() + "目标库位已被占用"); |
| | | } |
| | | // 禁用异常库位 |
| | | // locMast.setLocSts("X"); // X.禁用 |
| | |
| | | */ |
| | | @Component |
| | | public class AutoAssignAGVTasks { |
| | | private static final Logger log = LoggerFactory.getLogger(WorkMastScheduler.class); |
| | | private static final Logger log = LoggerFactory.getLogger(AutoAssignAGVTasks.class); |
| | | |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | |
| | | * 自动派发入库任务给AGV |
| | | */ |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private synchronized void execute(){ |
| | | public synchronized void execute(){ |
| | | /** |
| | | * agv状态 |
| | | * be_batch |
| | |
| | | * 自动派发补空板任务给AGV |
| | | */ |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private synchronized void autoFillEmptyPallets(){ |
| | | public synchronized void autoFillEmptyPallets(){ |
| | | /** |
| | | * 该字段是组托入库自动出发补空托盘标记 |
| | | * item_num |
| | |
| | | * 自动派发出库任务给agv搬运 |
| | | */ |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private synchronized void autoOut(){ |
| | | public synchronized void autoOut(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", 30)); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | |
| | | * 入库任务自动解绑agv站点 |
| | | */ |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private synchronized void UnbindTheSite(){ |
| | | public synchronized void UnbindTheSite(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .in("io_type",1,53) |
| | | .ge("wrk_sts", 2) |
| | |
| | | * 将两个深库位合并为深浅库位,物料号相同,源库位入库日期早于目标库位对应深库位入库日期,库位状态都为F |
| | | */ |
| | | @Scheduled(cron = "0/30 * * * * ?") |
| | | private void execute() throws ParseException { |
| | | public void execute() throws ParseException { |
| | | if (!confirmDeep) return; |
| | | |
| | | ReturnT<String> result = checkDeepHandler.start(); |
| | |
| | | private ErrorStockHandler errorStockHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | public void execute(){ |
| | | ReturnT<String> returnT = errorStockHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | |
| | | private NotifyLogHandler notifyLogHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | public void execute(){ |
| | | ReturnT<String> returnT = notifyLogHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | |
| | | } |
| | | } |
| | | |
| | | // @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public void completeAndReport(){ |
| | | String erpReport = Parameter.get().getErpReport(); |
| | | if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) { |
| | | List<Order> orders = orderService.selectComplete(); |
| | | for (Order order : orders) { |
| | | ReturnT<String> result = orderSyncHandler.start(order); |
| | | if (!result.isSuccess()) { |
| | | log.error("单据[orderNo={}]上报erp失败", order.getOrderNo()); |
| | | try { |
| | | ReturnT<String> result = orderSyncHandler.start(order); |
| | | if (!result.isSuccess()) { |
| | | log.error("单据[orderNo={}]上报erp失败", order.getOrderNo()); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | log.error("单据[orderNo={}]上报erp报错", order.getOrderNo()); |
| | | } |
| | | } |
| | | } |
| | |
| | | private OverYearLogHandler overYearLogHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | public void execute(){ |
| | | ReturnT<String> returnT = overYearLogHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | |
| | | private PlcLogHandler plcLogHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | public void execute(){ |
| | | ReturnT<String> returnT = plcLogHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | public void execute(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectToBeHistoryData(); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | |
| | | private WorkMastHandler workMastHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | public void execute(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectToBeCompleteData(); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | |
| | | |
| | | //拣料任务处理 |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void jl(){ |
| | | public void jl(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .eq("io_type",103) |
| | | .eq("wrk_sts",14L) |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DocType; |
| | |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.model.MesPakinParam; |
| | | import com.zy.common.model.MesPakoutParam; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.third.entity.ExdInstockTarget; |
| | | import com.zy.third.entity.ExdOutstockTarget; |
| | | import com.zy.third.service.ExdInstockTargetService; |
| | | import com.zy.third.service.ExdOutstockTargetService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class OrderSyncHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | @Autowired |
| | |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | |
| | | @Autowired |
| | | private ExdInstockTargetService exdInstockTargetService; |
| | | |
| | | |
| | | @Autowired |
| | | private ExdOutstockTargetService exdOutstockTargetService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start(Order order) { |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | |
| | | return SUCCESS; |
| | | } |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | if (orderDetls.isEmpty()){ |
| | | return SUCCESS; |
| | | } |
| | | // 入库完成上报 |
| | | if (docType.getPakin() == 1) { |
| | | MesPakinParam pakinParam = new MesPakinParam(); |
| | | pakinParam.setPakinTime(DateUtils.convert(order.getUpdateTime())); |
| | | pakinParam.setLgortFrom("5008"); |
| | | pakinParam.setLgortTo("5006"); |
| | | ExdInstockTarget exdInstockTarge = null; |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | String serial = Cools.isEmpty(orderDetl.getBatch()) ? "" : orderDetl.getBatch(); |
| | | pakinParam.getList().add(new MesPakinParam.Detl(orderDetl.getMatnr() + (Cools.isEmpty(serial) ? "" : "-" + serial), orderDetl.getAnfme())); |
| | | exdInstockTarge = new ExdInstockTarget(); |
| | | exdInstockTarge.setFinterid(orderDetl.getDeadWarn()); |
| | | exdInstockTarge.setFbillno(orderDetl.getOrderNo()); |
| | | exdInstockTarge.setFtrantype(order.getDocType().intValue()); |
| | | exdInstockTarge.setFdate(DateUtils.convert(order.getOrderTime())); |
| | | exdInstockTarge.setFrob(orderDetl.getInspect()); |
| | | exdInstockTarge.setFuserid(Integer.getInteger(orderDetl.getColor())); |
| | | exdInstockTarge.setWritetime(new Date()); |
| | | exdInstockTarge.setWritor("WMS"); |
| | | exdInstockTarge.setStatus(0); |
| | | exdInstockTargetService.insert(exdInstockTarge); |
| | | } |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(MesConstant.URL) |
| | | .setPath(MesConstant.PAKIN_URL) |
| | | .setJson(JSON.toJSONString(pakinParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | success = true; |
| | | // 修改订单状态 4.完成 ===>> 6.已上报 |
| | | if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(pakinParam), response); |
| | | throw new CoolException("上报mes系统失败"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "成品库入库上报", |
| | | MesConstant.URL + MesConstant.PAKIN_URL, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(pakinParam), |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | // 出库完成上报 |
| | | if (docType.getPakout() == 1) { |
| | | MesPakoutParam pakoutParam = new MesPakoutParam(); |
| | | pakoutParam.setTag(!order.getDocType$().equalsIgnoreCase("手动出库单")); |
| | | pakoutParam.setPakoutTime(DateUtils.convert(order.getUpdateTime())); |
| | | pakoutParam.setLgortFrom("5006"); |
| | | pakoutParam.setLgortTo("1111"); |
| | | if (!pakoutParam.isTag()) { |
| | | pakoutParam.setKunnr("C1000"); |
| | | } |
| | | pakoutParam.setOrderNo(order.getOrderNo()); |
| | | } else if (docType.getPakout() == 1) { |
| | | // 出库完成上报 |
| | | ExdOutstockTarget exdOutstockTarget = null; |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | String serial = Cools.isEmpty(orderDetl.getBatch()) ? "" : orderDetl.getBatch(); |
| | | pakoutParam.getList().add(new MesPakoutParam.Detl(orderDetl.getMatnr() + (Cools.isEmpty(serial) ? "" : "-" + serial), orderDetl.getAnfme())); |
| | | } |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(MesConstant.URL) |
| | | .setPath(MesConstant.PAKOUT_URL) |
| | | .setJson(JSON.toJSONString(pakoutParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | success = true; |
| | | // 修改订单状态 4.完成 ===>> 6.已上报 |
| | | if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | exdOutstockTarget = new ExdOutstockTarget(); |
| | | exdOutstockTarget.setFinterid(orderDetl.getDeadWarn()); |
| | | exdOutstockTarget.setFbillno(orderDetl.getOrderNo()); |
| | | if (order.getDocType() == 42) { |
| | | exdOutstockTarget.setFtrantype(41); |
| | | } else if (order.getDocType() == 21) { |
| | | exdOutstockTarget.setFtrantype(81); |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKOUT_URL, JSON.toJSONString(pakoutParam), response); |
| | | throw new CoolException("上报mes系统失败"); |
| | | exdOutstockTarget.setFtrantype(order.getDocType().intValue()); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "成品库出库上报", |
| | | MesConstant.URL + MesConstant.PAKOUT_URL, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(pakoutParam), |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | exdOutstockTarget.setFdate(DateUtils.convert(order.getOrderTime())); |
| | | exdOutstockTarget.setFrob(orderDetl.getInspect()); |
| | | exdOutstockTarget.setFuserid(Integer.getInteger(orderDetl.getColor())); |
| | | exdOutstockTarget.setWritetime(new Date()); |
| | | exdOutstockTarget.setWritor("WMS"); |
| | | exdOutstockTarget.setStatus(0); |
| | | exdOutstockTargetService.insert(exdOutstockTarget); |
| | | |
| | | } |
| | | if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | return SUCCESS; |
| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.third.entity.ExdInstockTarget; |
| | | import com.zy.third.entity.ExdvYanbu; |
| | | import com.zy.third.mapper.ExdMaterialMapper; |
| | | import com.zy.third.service.ExdInstockTargetService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | @Autowired |
| | | private ExdInstockTargetService exdInstockTargetService; |
| | | |
| | | @Autowired |
| | | private ExdMaterialMapper exdMaterialMapper; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | | // 4.入库完成 |
| | | if (wrkMast.getWrkSts() == 4) { |
| | | return doIn(wrkMast); |
| | | // 14.出库完成 |
| | | } else if (wrkMast.getWrkSts() == 14) { |
| | | // 14.出库完成 |
| | | } else if (wrkMast.getWrkSts() == 14) { |
| | | return doOut(wrkMast); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private ReturnT<String> doIn(WrkMast wrkMast){ |
| | | private ReturnT<String> doIn(WrkMast wrkMast) { |
| | | Date now = new Date(); |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | try { |
| | |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); |
| | | if(orderDetl==null){ |
| | | orderDetl=orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null); |
| | | } |
| | | try { |
| | | if(!Cools.isEmpty(orderDetl)){ |
| | | if(!orderDetlService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetl.getBatch(),wrkDetl.getAnfme())){ |
| | | if (!Cools.isEmpty(orderDetl)) { |
| | | if (!orderDetlService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetl.getBatch(), wrkDetl.getAnfme())) { |
| | | // exceptionHandle("全板入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore){} |
| | | } catch (Exception ignore) { |
| | | } |
| | | |
| | | } |
| | | // 写入中间表数据 |
| | | write(wrkMast, wrkDetls); |
| | | // 修改库位状态 S ====>> F |
| | | if (locMast.getLocSts().equals("S")) { |
| | | locMast.setLocSts("F"); |
| | |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); |
| | | if(orderDetl==null){ |
| | | orderDetl=orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null); |
| | | } |
| | | try { |
| | | if(!Cools.isEmpty(orderDetl)){ |
| | | if(!orderDetlService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetl.getBatch(),wrkDetl.getAnfme())){ |
| | | if (!Cools.isEmpty(orderDetl)) { |
| | | if (!orderDetlService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetl.getBatch(), wrkDetl.getAnfme())) { |
| | | // exceptionHandle("拣料入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore){} |
| | | } catch (Exception ignore) { |
| | | } |
| | | |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | |
| | | return FAIL.setMsg("并板入库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | // 修改库存明细数量,如无库存,曾新增 |
| | | for (WrkDetl wrkDetl:wrkDetls54) { |
| | | for (WrkDetl wrkDetl : wrkDetls54) { |
| | | |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); |
| | | if (null != locDetl) { |
| | |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocSts().equals("Q")) { |
| | | locMast.setLocSts(wrkMast.getFullPlt().equals("Y")?"F":"D"); |
| | | locMast.setLocSts(wrkMast.getFullPlt().equals("Y") ? "F" : "D"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private ReturnT<String> doOut(WrkMast wrkMast){ |
| | | private ReturnT<String> doOut(WrkMast wrkMast) { |
| | | Date now = new Date(); |
| | | LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | try { |
| | |
| | | for (WrkDetl wrkDetl : wrkDetls101) { |
| | | // 更新订单完成数量 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); |
| | | if(orderDetl==null){ |
| | | orderDetl=orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null); |
| | | } |
| | | try { |
| | | if(!Cools.isEmpty(orderDetl)){ |
| | | if(!orderDetlService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetl.getBatch(),wrkDetl.getAnfme())){ |
| | | if (!Cools.isEmpty(orderDetl)) { |
| | | if (!orderDetlService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetl.getBatch(), wrkDetl.getAnfme())) { |
| | | // exceptionHandle("全板出库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板出库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore){} |
| | | } catch (Exception ignore) { |
| | | } |
| | | } |
| | | // 删除工作档源库位的库存明细 |
| | | if (!locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getSourceLocNo()))) { |
| | |
| | | default: |
| | | break; |
| | | } |
| | | if(Cools.isEmpty(wrkMast.getMemo())){ |
| | | if (Cools.isEmpty(wrkMast.getMemo())) { |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(15L); |
| | | }else { |
| | | } else { |
| | | wrkMast.setWrkSts(30L); |
| | | } |
| | | |
| | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | private void write(WrkMast wrkMast, List<WrkDetl> wrkDetls) { |
| | | ExdInstockTarget exdInstockTarge; |
| | | int i = -1; |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | if (Cools.isEmpty(wrkDetl.getOrderNo()) && !Cools.isEmpty(wrkDetl.getInspect()) && wrkDetl.getInspect() == 1) { |
| | | continue; |
| | | } |
| | | ExdvYanbu bacode = exdMaterialMapper.getBacode(wrkDetl.getBatch()); |
| | | exdInstockTarge = new ExdInstockTarget(); |
| | | exdInstockTarge.setFtrantype(21); |
| | | exdInstockTarge.setFdate(new Date()); |
| | | exdInstockTarge.setFrob(1); |
| | | |
| | | exdInstockTarge.setFqty(wrkDetl.getAnfme()); |
| | | exdInstockTarge.setFbatchno(bacode.getBatchno()); |
| | | exdInstockTarge.setFsourcebillno(bacode.getIcmono()); |
| | | exdInstockTarge.setFsourcetrantype(85); |
| | | |
| | | exdInstockTarge.setFentryid(i); |
| | | exdInstockTarge.setFsmanagerid(Integer.valueOf(wrkDetl.getColor())); |
| | | exdInstockTarge.setFfmanagerid(Integer.valueOf(wrkDetl.getColor())); |
| | | exdInstockTarge.setFbillerid(Integer.valueOf(wrkDetl.getColor())); |
| | | exdInstockTarge.setFitemid(Integer.parseInt(wrkDetl.getSku())); |
| | | |
| | | exdInstockTarge.setFsourceentryid(i); |
| | | exdInstockTarge.setFdcspid(wrkMast.getLocNo()); |
| | | exdInstockTarge.setFdcstockid(wrkDetl.getBrand()); |
| | | |
| | | exdInstockTarge.setBarcode(wrkDetl.getBatch()); |
| | | exdInstockTarge.setGross(bacode.getGross()); |
| | | exdInstockTarge.setWidth(bacode.getWidth()); |
| | | exdInstockTarge.setDefects(bacode.getDefects()); |
| | | exdInstockTarge.setBackcode(bacode.getBackcode()); |
| | | exdInstockTarge.setWritetime(new Date()); |
| | | exdInstockTarge.setWritor("WMS"); |
| | | exdInstockTarge.setStatus(0); |
| | | exdInstockTargetService.insert(exdInstockTarge); |
| | | i++; |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.common.config.ds; |
| | | |
| | | import org.springframework.beans.factory.InitializingBean; |
| | | import org.springframework.jdbc.datasource.AbstractDataSource; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import javax.sql.DataSource; |
| | | import java.util.Map; |
| | | |
| | | public abstract class AbstractRoutingDataSource extends AbstractDataSource implements InitializingBean { |
| | | //多数据源map集合 |
| | | private Map<Object, Object> targetDataSources; |
| | | //默认数据源 |
| | | private Object defaultTargetDataSource; |
| | | //其实就是targetDataSources,后面的afterPropertiesSet()方法会将targetDataSources赋值给resolvedDataSources |
| | | private Map<Object, DataSource> resolvedDataSources; |
| | | private DataSource resolvedDefaultDataSource; |
| | | |
| | | public void setTargetDataSources(Map<Object, Object> targetDataSources) { |
| | | this.targetDataSources = targetDataSources; |
| | | } |
| | | |
| | | protected DataSource determineTargetDataSource() { |
| | | Assert.notNull(this.resolvedDataSources, "DataSource router not initialized"); |
| | | Object lookupKey = this.determineCurrentLookupKey(); |
| | | DataSource dataSource = (DataSource) this.resolvedDataSources.get(lookupKey); |
| | | if (dataSource == null && ( lookupKey == null)) { |
| | | dataSource = this.resolvedDefaultDataSource; |
| | | } |
| | | if (dataSource == null) { |
| | | throw new IllegalStateException("Cannot determine target DataSource for lookup key [" + lookupKey + "]"); |
| | | } else { |
| | | return dataSource; |
| | | } |
| | | } |
| | | |
| | | protected abstract Object determineCurrentLookupKey(); |
| | | } |
| New file |
| | |
| | | package com.zy.common.config.ds; |
| | | |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Before; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Aspect |
| | | @Component |
| | | public class DataSourceAop { |
| | | @Before("execution(* com.zy.asrs..*(..))") |
| | | public void setDataSource2test01() { |
| | | //System.err.println("test01业务"); |
| | | DataSourceType.setDataBaseType(DataSourceType.DataBaseType.TEST01); |
| | | } |
| | | |
| | | @Before("execution(* com.zy.system..*(..))") |
| | | public void setDataSource2test012() { |
| | | //System.err.println("test01业务"); |
| | | DataSourceType.setDataBaseType(DataSourceType.DataBaseType.TEST01); |
| | | } |
| | | |
| | | @Before("execution(* com.zy.third..*(..))") |
| | | public void setDataSource2test02() { |
| | | //System.err.println("test02业务"); |
| | | DataSourceType.setDataBaseType(DataSourceType.DataBaseType.TEST02); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.common.config.ds; |
| | | |
| | | import com.zaxxer.hikari.HikariConfig; |
| | | import com.zaxxer.hikari.HikariDataSource; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.boot.jdbc.DataSourceBuilder; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.Primary; |
| | | |
| | | import javax.sql.DataSource; |
| | | |
| | | |
| | | @Configuration |
| | | public class DataSourceConfig { |
| | | |
| | | @Value("${other.datasource.jdbc-url}") |
| | | private String url; |
| | | @Value("${other.datasource.username}") |
| | | private String username; |
| | | @Value("${other.datasource.password}") |
| | | private String password; |
| | | @Value("${other.datasource.driver-class-name}") |
| | | private String driverClassName; |
| | | |
| | | // 主数据源 |
| | | @Bean(name = "dataSource") |
| | | @Primary |
| | | @ConfigurationProperties(prefix = "spring.datasource") |
| | | public DataSource primaryDataSource() { |
| | | return DataSourceBuilder.create().build(); |
| | | } |
| | | |
| | | // 次数据源 |
| | | @Bean(name = "slaveDataSource") |
| | | public DataSource secondaryDataSource() { |
| | | HikariConfig config = new HikariConfig(); |
| | | config.setJdbcUrl(url); |
| | | config.setUsername(username); |
| | | config.setPassword(password); |
| | | config.setDriverClassName(driverClassName); |
| | | config.setInitializationFailTimeout(0L); |
| | | return new HikariDataSource( config); |
| | | // return DataSourceBuilder.create() |
| | | // .driverClassName(driverClassName) |
| | | // .url(url) |
| | | // .username(username) |
| | | // .password(password) |
| | | // .build(); |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.common.config.ds; |
| | | |
| | | public class DataSourceType { |
| | | |
| | | public enum DataBaseType { |
| | | TEST01, TEST02 |
| | | } |
| | | |
| | | // 使用ThreadLocal保证线程安全 |
| | | private static final ThreadLocal<DataBaseType> TYPE = new ThreadLocal<DataBaseType>(); |
| | | |
| | | // 往当前线程里设置数据源类型 |
| | | public static void setDataBaseType(DataBaseType dataBaseType) { |
| | | if (dataBaseType == null) { |
| | | throw new NullPointerException(); |
| | | } |
| | | //System.err.println("[将当前数据源改为]:" + dataBaseType); |
| | | TYPE.set(dataBaseType); |
| | | } |
| | | |
| | | // 获取数据源类型 |
| | | public static DataBaseType getDataBaseType() { |
| | | DataBaseType dataBaseType = TYPE.get() == null ? DataBaseType.TEST01 : TYPE.get(); |
| | | //System.err.println("[获取当前数据源的类型为]:" + dataBaseType); |
| | | return dataBaseType; |
| | | } |
| | | |
| | | // 清空数据类型 |
| | | public static void clearDataBaseType() { |
| | | TYPE.remove(); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.common.config.ds; |
| | | |
| | | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; |
| | | |
| | | public class DynamicDataSource extends AbstractRoutingDataSource { |
| | | @Override |
| | | protected Object determineCurrentLookupKey() { |
| | | DataSourceType.DataBaseType dataBaseType = DataSourceType.getDataBaseType(); |
| | | return dataBaseType; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.common.config.ds; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; |
| | | import com.baomidou.mybatisplus.spring.MybatisSqlSessionFactoryBean; |
| | | import org.apache.ibatis.plugin.Interceptor; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.Primary; |
| | | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
| | | import org.springframework.jdbc.datasource.DataSourceTransactionManager; |
| | | |
| | | import javax.sql.DataSource; |
| | | |
| | | @Configuration |
| | | @MapperScan(basePackages = {"com.zy.asrs.mapper", "com.zy.system.mapper"}, sqlSessionFactoryRef = "primarySqlSessionFactory") |
| | | public class PrimaryDataSourceConfig { |
| | | |
| | | @Bean(name = "primarySqlSessionFactory") |
| | | @Primary |
| | | public MybatisSqlSessionFactoryBean primarySqlSessionFactory(@Qualifier("dataSource") DataSource dataSource, PaginationInterceptor paginationInterceptor) throws Exception { |
| | | MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean(); |
| | | sessionFactory.setDataSource(dataSource); |
| | | // 设置MyBatis的Mapper XML文件路径 |
| | | sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver() |
| | | .getResources("classpath:mapper/asrs/*.xml")); |
| | | Interceptor[] interceptors = new Interceptor[]{paginationInterceptor}; |
| | | sessionFactory.setPlugins(interceptors); |
| | | return sessionFactory; |
| | | } |
| | | |
| | | @Bean(name = "transactionManager") |
| | | @Primary |
| | | public DataSourceTransactionManager primaryTransactionManager(@Qualifier("dataSource") DataSource dataSource) { |
| | | return new DataSourceTransactionManager(dataSource); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.common.config.ds; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; |
| | | import com.baomidou.mybatisplus.spring.MybatisSqlSessionFactoryBean; |
| | | import org.apache.ibatis.plugin.Interceptor; |
| | | import org.apache.ibatis.session.SqlSessionFactory; |
| | | import org.mybatis.spring.SqlSessionTemplate; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
| | | import org.springframework.jdbc.datasource.DataSourceTransactionManager; |
| | | |
| | | import javax.sql.DataSource; |
| | | |
| | | @Configuration |
| | | @MapperScan(basePackages = "com.zy.third.mapper", sqlSessionFactoryRef = "secondarySqlSessionFactory") |
| | | public class SecondaryDataSourceConfig { |
| | | |
| | | @Bean(name = "secondarySqlSessionFactory") |
| | | public SqlSessionFactory secondarySqlSessionFactory(@Qualifier("slaveDataSource") DataSource dataSource, PaginationInterceptor paginationInterceptor) throws Exception { |
| | | try { |
| | | MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean(); |
| | | sessionFactory.setDataSource(dataSource); |
| | | // 设置MyBatis的Mapper XML文件路径 |
| | | sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver() |
| | | .getResources("classpath:mapper/third/*.xml")); |
| | | Interceptor[] interceptors = new Interceptor[]{paginationInterceptor}; |
| | | sessionFactory.setPlugins(interceptors); |
| | | return sessionFactory.getObject(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | @Bean(name = "secondaryTransactionManager") |
| | | public DataSourceTransactionManager secondaryTransactionManager(@Qualifier("slaveDataSource") DataSource dataSource) { |
| | | return new DataSourceTransactionManager(dataSource); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | |
| | | |
| | | private Double anfme; |
| | | |
| | | private Integer frob; |
| | | |
| | | private Integer FInterID; |
| | | |
| | | |
| | | public DetlDto() { |
| | | } |
| | | |
| | |
| | | protected User getUser(){ |
| | | User user = userService.selectById(getUserId()); |
| | | if (null == user) { |
| | | if (getUserId() == 9527){ |
| | | user = new User(); |
| | | user.setId(9527L); |
| | | user.setUsername("super"); |
| | | return user ; |
| | | } |
| | | throw new CoolException(BaseRes.DENIED); |
| | | } |
| | | return user; |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Customer |
| | | */ |
| | | @TableName(value ="Exd_Customer") |
| | | @Data |
| | | public class ExdCustomer implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId |
| | | private String id; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fnumber; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fname; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Department |
| | | */ |
| | | @TableName(value ="Exd_Department") |
| | | @Data |
| | | public class ExdDepartment implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId |
| | | private String id; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fnumber; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fname; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Emp |
| | | */ |
| | | @TableName(value ="Exd_Emp") |
| | | @Data |
| | | public class ExdEmp implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId |
| | | private String id; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fnumber; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fname; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Instock_Source |
| | | */ |
| | | @TableName(value ="Exd_Instock_Source") |
| | | @Data |
| | | public class ExdInstockSource implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private String ID; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer finterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fbillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer ftrantype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date fdate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer frob; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdeptid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsupplyid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fbillerid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fitemid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fqty; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fprice; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fbatchno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer funitid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fsourcebillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourceentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourceinterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourcetrantype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdcspid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdcstockid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String forderbillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer forderentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer forderinterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fplanmode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Instock_Target |
| | | */ |
| | | @TableName(value ="Exd_Instock_Target") |
| | | @Data |
| | | public class ExdInstockTarget implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private String ID; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer finterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fbillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer ftrantype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date fdate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer frob; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fuserid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdeptid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsupplyid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fbillerid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer ffmanagerid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsmanagerid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fitemid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fqty; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fprice; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fbatchno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer funitid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fsourcebillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourceentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourceinterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourcetrantype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fdcspid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fdcstockid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String forderbillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer forderentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer forderinterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fplanmode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String barcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double gross; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer defects; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String backcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Material |
| | | */ |
| | | @TableName(value ="Exd_Material") |
| | | @Data |
| | | public class ExdMaterial implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId |
| | | private String id; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fnumber; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fname; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fmodel; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Outstock_Source |
| | | */ |
| | | @TableName(value ="Exd_Outstock_Source") |
| | | @Data |
| | | public class ExdOutstockSource implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private String ID; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer finterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fbillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer ftrantype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date fdate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer frob; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdeptid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsupplyid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fbillerid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fitemid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fqty; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fprice; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fbatchno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer funitid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fsourcebillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourceentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourceinterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourcetrantype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdcspid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdcstockid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fscspid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fscstockid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String forderbillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer forderentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer forderinterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fplanmode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Outstock_Target |
| | | */ |
| | | @TableName(value ="Exd_Outstock_Target") |
| | | @Data |
| | | public class ExdOutstockTarget implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private String ID; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer finterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fbillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer ftrantype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date fdate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer frob; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fuserid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdeptid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsupplyid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fbillerid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fitemid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fqtymust; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fqty; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double fprice; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fbatchno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer funitid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fsourcebillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourceentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourceinterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fsourcetrantype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdcspid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fdcstockid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fscspid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fscstockid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String forderbillno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer forderentryid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer forderinterid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer fplanmode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String barcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private BigDecimal gross; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private BigDecimal width; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private BigDecimal defects; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String backcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_Supplier |
| | | */ |
| | | @TableName(value ="Exd_Supplier") |
| | | @Data |
| | | public class ExdSupplier implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId |
| | | private String id; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fnumber; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String fname; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName Exd_User |
| | | */ |
| | | @TableName(value ="Exd_User") |
| | | @Data |
| | | public class ExdUser implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId |
| | | private String id; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date writetime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writor; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reador; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String writormsg; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String readormsg; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName ExdV_Yanbu |
| | | */ |
| | | @TableName(value ="ExdV_Yanbu") |
| | | @Data |
| | | public class ExdvYanbu implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | private String barcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private BigDecimal qty; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String itemnumber; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String itemname; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String itemmodel; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String batchno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String icmono; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String pono; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double gross; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer defects; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String cuspartno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String supplierpartno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String supplierno; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date packdate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String revision; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date createdate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date readdate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String parts; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String oemproject; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String qcempid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String qcempname; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date modifydate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String backcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String qualitylevel; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reserve01; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reserve02; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String reserve03; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private BigDecimal reserve04; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private BigDecimal reserve05; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String qcempid2; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String qcempname2; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Date packendtime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String qcempid3; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String qcempname3; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdCustomer; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Customer】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdCustomer |
| | | */ |
| | | public interface ExdCustomerMapper extends BaseMapper<ExdCustomer> { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdDepartment; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Department】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdDepartment |
| | | */ |
| | | public interface ExdDepartmentMapper extends BaseMapper<ExdDepartment> { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdEmp; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Emp】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdEmp |
| | | */ |
| | | public interface ExdEmpMapper extends BaseMapper<ExdEmp> { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdInstockSource; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Instock_Source】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdInstockSource |
| | | */ |
| | | public interface ExdInstockSourceMapper extends BaseMapper<ExdInstockSource> { |
| | | |
| | | |
| | | List<String> listOrderNo(); |
| | | |
| | | List<ExdInstockSource> listAll(@Param("orderNo") String orderNo); |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdInstockTarget; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Instock_Target】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdInstockTarget |
| | | */ |
| | | public interface ExdInstockTargetMapper extends BaseMapper<ExdInstockTarget> { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.third.entity.ExdMaterial; |
| | | import com.zy.third.entity.ExdvYanbu; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Material】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdMaterial |
| | | */ |
| | | public interface ExdMaterialMapper extends BaseMapper<ExdMaterial> { |
| | | |
| | | ExdvYanbu getBacode(@Param("barcode") String barcode); |
| | | |
| | | |
| | | List<ExdMaterial> listAll(); |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdOutstockSource; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Outstock_Source】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdOutstockSource |
| | | */ |
| | | public interface ExdOutstockSourceMapper extends BaseMapper<ExdOutstockSource> { |
| | | |
| | | |
| | | List<String> listOrderNo(); |
| | | |
| | | List<ExdOutstockSource> listAll(@Param("orderNo") String orderNo); |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdOutstockTarget; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Outstock_Target】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdOutstockTarget |
| | | */ |
| | | public interface ExdOutstockTargetMapper extends BaseMapper<ExdOutstockTarget> { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdSupplier; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Supplier】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdSupplier |
| | | */ |
| | | public interface ExdSupplierMapper extends BaseMapper<ExdSupplier> { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.mapper; |
| | | |
| | | import com.zy.third.entity.ExdUser; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_User】的数据库操作Mapper |
| | | * @createDate 2025-09-24 08:20:14 |
| | | * @Entity com.zy.third.entity.ExdUser |
| | | */ |
| | | public interface ExdUserMapper extends BaseMapper<ExdUser> { |
| | | |
| | | |
| | | List<ExdUser> listAll(); |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdCustomer; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Customer】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdCustomerService extends IService<ExdCustomer> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdDepartment; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Department】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdDepartmentService extends IService<ExdDepartment> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdEmp; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Emp】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdEmpService extends IService<ExdEmp> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdInstockSource; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Instock_Source】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdInstockSourceService extends IService<ExdInstockSource> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdInstockTarget; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Instock_Target】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdInstockTargetService extends IService<ExdInstockTarget> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdMaterial; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Material】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdMaterialService extends IService<ExdMaterial> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdOutstockSource; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Outstock_Source】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdOutstockSourceService extends IService<ExdOutstockSource> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdOutstockTarget; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Outstock_Target】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdOutstockTargetService extends IService<ExdOutstockTarget> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdSupplier; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Supplier】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdSupplierService extends IService<ExdSupplier> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service; |
| | | |
| | | import com.zy.third.entity.ExdUser; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_User】的数据库操作Service |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | public interface ExdUserService extends IService<ExdUser> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdCustomer; |
| | | import com.zy.third.service.ExdCustomerService; |
| | | import com.zy.third.mapper.ExdCustomerMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Customer】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdCustomerServiceImpl extends ServiceImpl<ExdCustomerMapper, ExdCustomer> |
| | | implements ExdCustomerService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdDepartment; |
| | | import com.zy.third.service.ExdDepartmentService; |
| | | import com.zy.third.mapper.ExdDepartmentMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Department】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdDepartmentServiceImpl extends ServiceImpl<ExdDepartmentMapper, ExdDepartment> |
| | | implements ExdDepartmentService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdEmp; |
| | | import com.zy.third.service.ExdEmpService; |
| | | import com.zy.third.mapper.ExdEmpMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Emp】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdEmpServiceImpl extends ServiceImpl<ExdEmpMapper, ExdEmp> |
| | | implements ExdEmpService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdInstockSource; |
| | | import com.zy.third.service.ExdInstockSourceService; |
| | | import com.zy.third.mapper.ExdInstockSourceMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Instock_Source】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdInstockSourceServiceImpl extends ServiceImpl<ExdInstockSourceMapper, ExdInstockSource> |
| | | implements ExdInstockSourceService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdInstockTarget; |
| | | import com.zy.third.service.ExdInstockTargetService; |
| | | import com.zy.third.mapper.ExdInstockTargetMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Instock_Target】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdInstockTargetServiceImpl extends ServiceImpl<ExdInstockTargetMapper, ExdInstockTarget> |
| | | implements ExdInstockTargetService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdMaterial; |
| | | import com.zy.third.service.ExdMaterialService; |
| | | import com.zy.third.mapper.ExdMaterialMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Material】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdMaterialServiceImpl extends ServiceImpl<ExdMaterialMapper, ExdMaterial> |
| | | implements ExdMaterialService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdOutstockSource; |
| | | import com.zy.third.service.ExdOutstockSourceService; |
| | | import com.zy.third.mapper.ExdOutstockSourceMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Outstock_Source】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdOutstockSourceServiceImpl extends ServiceImpl<ExdOutstockSourceMapper, ExdOutstockSource> |
| | | implements ExdOutstockSourceService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdOutstockTarget; |
| | | import com.zy.third.service.ExdOutstockTargetService; |
| | | import com.zy.third.mapper.ExdOutstockTargetMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Outstock_Target】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdOutstockTargetServiceImpl extends ServiceImpl<ExdOutstockTargetMapper, ExdOutstockTarget> |
| | | implements ExdOutstockTargetService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdSupplier; |
| | | import com.zy.third.service.ExdSupplierService; |
| | | import com.zy.third.mapper.ExdSupplierMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_Supplier】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdSupplierServiceImpl extends ServiceImpl<ExdSupplierMapper, ExdSupplier> |
| | | implements ExdSupplierService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.third.entity.ExdUser; |
| | | import com.zy.third.service.ExdUserService; |
| | | import com.zy.third.mapper.ExdUserMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【Exd_User】的数据库操作Service实现 |
| | | * @createDate 2025-09-24 08:20:14 |
| | | */ |
| | | @Service |
| | | public class ExdUserServiceImpl extends ServiceImpl<ExdUserMapper, ExdUser> |
| | | implements ExdUserService{ |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.task; |
| | | |
| | | import com.zy.third.entity.ExdMaterial; |
| | | import com.zy.third.entity.ExdUser; |
| | | import com.zy.third.mapper.ExdMaterialMapper; |
| | | import com.zy.third.mapper.ExdUserMapper; |
| | | import com.zy.third.task.handler.BaseDataHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class BaseDataScheduler { |
| | | |
| | | |
| | | @Autowired |
| | | private BaseDataHandler baseDataHandler; |
| | | |
| | | |
| | | @Autowired |
| | | private ExdUserMapper exdUserMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private ExdMaterialMapper exdMaterialMapper; |
| | | |
| | | |
| | | /** |
| | | * 读取用户信息 |
| | | */ |
| | | @Scheduled(cron = "0/30 * * * * ? ") |
| | | public void readUser() { |
| | | log.info("读取用户信息"); |
| | | List<ExdUser> exdUsers = exdUserMapper.listAll(); |
| | | for (ExdUser exdUser : exdUsers) { |
| | | try { |
| | | if (baseDataHandler.readUser(exdUser).isSuccess()) { |
| | | exdUser.setStatus(1); |
| | | } else { |
| | | exdUser.setStatus(2); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("读取用户信息失败:{},{}", exdUser, e.getMessage()); |
| | | exdUser.setStatus(2); |
| | | exdUser.setReadormsg(e.getMessage()); |
| | | } finally { |
| | | exdUser.setReadtime(new Date()); |
| | | exdUserMapper.updateById(exdUser); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 读取物料信息 |
| | | */ |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public void readMat() { |
| | | log.info("读取物料信息"); |
| | | List<ExdMaterial> exdMaterials = exdMaterialMapper.listAll(); |
| | | for (ExdMaterial exdMaterial : exdMaterials) { |
| | | try { |
| | | if (baseDataHandler.readMat(exdMaterial).isSuccess()) { |
| | | exdMaterial.setStatus(1); |
| | | } else { |
| | | exdMaterial.setStatus(2); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("读取物料信息失败:{},{}", exdMaterial, e.getMessage()); |
| | | exdMaterial.setStatus(2); |
| | | exdMaterial.setReadormsg(e.getMessage()); |
| | | } finally { |
| | | exdMaterial.setReadtime(new Date()); |
| | | exdMaterialMapper.updateById(exdMaterial); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 读取部门信息 |
| | | */ |
| | | @Scheduled(cron = "0/30 * * * * ? ") |
| | | public void readDept() { |
| | | log.info("读取部门信息"); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.third.task; |
| | | |
| | | import com.zy.third.entity.ExdInstockSource; |
| | | import com.zy.third.entity.ExdOutstockSource; |
| | | import com.zy.third.mapper.ExdInstockSourceMapper; |
| | | import com.zy.third.mapper.ExdOutstockSourceMapper; |
| | | import com.zy.third.task.handler.OrderHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class OrderScheduler { |
| | | |
| | | |
| | | @Autowired |
| | | private OrderHandler orderHandler; |
| | | |
| | | @Autowired |
| | | private ExdInstockSourceMapper exdInstockSourceMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private ExdOutstockSourceMapper exdOutstockSourceMapper; |
| | | |
| | | |
| | | /** |
| | | * 读取入库单据 |
| | | */ |
| | | @Scheduled(cron = "0/10 * * * * ? ") |
| | | public void readInOrder() { |
| | | log.info("读取入库单据"); |
| | | List<String> orderNos = exdInstockSourceMapper.listOrderNo(); |
| | | for (String orderNo : orderNos) { |
| | | List<ExdInstockSource> exdInstockSources = exdInstockSourceMapper.listAll(orderNo); |
| | | try { |
| | | boolean success = orderHandler.readInOrder(exdInstockSources).isSuccess(); |
| | | for (ExdInstockSource exdInstockSource : exdInstockSources) { |
| | | if (success) { |
| | | exdInstockSource.setReadtime(new Date()); |
| | | exdInstockSource.setStatus(1); |
| | | exdInstockSourceMapper.updateById(exdInstockSource); |
| | | } else { |
| | | exdInstockSource.setReadtime(new Date()); |
| | | exdInstockSource.setStatus(2); |
| | | exdInstockSourceMapper.updateById(exdInstockSource); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("读取入库单据信息失败:{},{}", exdInstockSources, e.getMessage()); |
| | | for (ExdInstockSource exdInstockSource : exdInstockSources) { |
| | | exdInstockSource.setReadormsg(e.getMessage()); |
| | | exdInstockSource.setStatus(2); |
| | | exdInstockSourceMapper.updateById(exdInstockSource); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 读取出库单据 |
| | | */ |
| | | @Scheduled(cron = "0/10 * * * * ? ") |
| | | public void readOutOrder() { |
| | | log.info("读取出库单据"); |
| | | List<String> orderNos = exdOutstockSourceMapper.listOrderNo(); |
| | | for (String orderNo : orderNos) { |
| | | List<ExdOutstockSource> exdOutstockSources = exdOutstockSourceMapper.listAll(orderNo); |
| | | try { |
| | | boolean success = orderHandler.readOutOrder(exdOutstockSources).isSuccess(); |
| | | for (ExdOutstockSource exdOutstockSource : exdOutstockSources) { |
| | | if (success) { |
| | | exdOutstockSource.setReadtime(new Date()); |
| | | exdOutstockSource.setStatus(1); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } else { |
| | | exdOutstockSource.setReadtime(new Date()); |
| | | exdOutstockSource.setStatus(2); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("读取出库单据信息失败:{},{}", exdOutstockSources, e.getMessage()); |
| | | for (ExdOutstockSource exdOutstockSource : exdOutstockSources) { |
| | | exdOutstockSource.setStatus(2); |
| | | exdOutstockSource.setReadormsg(e.getMessage()); |
| | | exdOutstockSourceMapper.updateById(exdOutstockSource); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.third.task.handler; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.TagService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.third.entity.ExdMaterial; |
| | | import com.zy.third.entity.ExdUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class BaseDataHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @Autowired |
| | | private UserService userService; |
| | | |
| | | @Autowired |
| | | private TagService tagService; |
| | | |
| | | |
| | | @Transactional |
| | | public ReturnT<String> readUser(ExdUser exdUser) { |
| | | User user = userService.selectOne(new EntityWrapper<User>().eq("username", exdUser.getName())); |
| | | if (user == null) { |
| | | user = new User(); |
| | | user.setUsername(exdUser.getName()); |
| | | user.setNickname(exdUser.getName()); |
| | | user.setMobile(exdUser.getName()); |
| | | user.setEmail(exdUser.getId()); |
| | | user.setRoleId(2L); |
| | | user.setCreateTime(new Date()); |
| | | user.setStatus(1); |
| | | userService.insert(user); |
| | | }else { |
| | | user.setUsername(exdUser.getName()); |
| | | user.setNickname(exdUser.getName()); |
| | | user.setMobile(exdUser.getName()); |
| | | user.setEmail(exdUser.getId()); |
| | | userService.updateById(user); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | @Transactional |
| | | public ReturnT<String> readMat(ExdMaterial exdMaterial) { |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", exdMaterial.getFnumber())); |
| | | if (mat == null) { |
| | | mat = new Mat(); |
| | | mat.setMatnr(exdMaterial.getFnumber()); |
| | | mat.setMaktx(exdMaterial.getFname()); |
| | | mat.setSpecs(exdMaterial.getFmodel()); |
| | | mat.setSku(exdMaterial.getId()); |
| | | mat.setTagId(tagService.getTop().getId()); |
| | | mat.setStatus(1); |
| | | mat.setCreateTime(new Date()); |
| | | matService.insert(mat); |
| | | }else { |
| | | mat.setMatnr(exdMaterial.getFnumber()); |
| | | mat.setMaktx(exdMaterial.getFname()); |
| | | mat.setSpecs(exdMaterial.getFmodel()); |
| | | mat.setSku(exdMaterial.getId()); |
| | | mat.setTagId(tagService.getTop().getId()); |
| | | mat.setStatus(1); |
| | | matService.updateById(mat); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.third.task.handler; |
| | | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.third.entity.ExdInstockSource; |
| | | import com.zy.third.entity.ExdOutstockSource; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class OrderHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | |
| | | @Transactional |
| | | public ReturnT<String> readInOrder(List<ExdInstockSource> exdInstockSource) { |
| | | String fbillno = exdInstockSource.get(0).getFbillno(); |
| | | Integer ftrantype = exdInstockSource.get(0).getFtrantype(); |
| | | Order order = orderService.selectByNo(fbillno); |
| | | if (!Cools.isEmpty(order)) { |
| | | throw new CoolException(fbillno + "单据已存在,请勿重复提交"); |
| | | } |
| | | DocType docType = docTypeService.selectById(ftrantype); |
| | | if (docType == null) { |
| | | |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | // 单据主档 |
| | | order = new Order( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | fbillno, // 订单编号 |
| | | DateUtils.convert(exdInstockSource.get(0).getFdate()), // 单据日期 |
| | | docType.getDocId(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | null, // 客户编号 |
| | | null, // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | | null, // 优惠率 |
| | | null, // 优惠金额 |
| | | null, // 销售或采购费用合计 |
| | | null, // 实付金额 |
| | | null, // 付款类型 |
| | | null, // 业务员 |
| | | null, // 结算天数 |
| | | null, // 邮费支付类型 |
| | | null, // 邮费 |
| | | null, // 付款时间 |
| | | null, // 发货时间 |
| | | null, // 物流名称 |
| | | null, // 物流单号 |
| | | 1L, // 订单状态 |
| | | 1, // 状态 |
| | | 9527L, // 添加人员 |
| | | now, // 添加时间 |
| | | 9527L, // 修改人员 |
| | | now, // 修改时间 |
| | | null // 备注 |
| | | ); |
| | | if (!orderService.insert(order)) { |
| | | throw new CoolException("生成单据主档失败,请联系管理员"); |
| | | } |
| | | // 单据明细档 |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (ExdInstockSource detail : exdInstockSource) { |
| | | DetlDto dto = new DetlDto(detail.getFitemid() + "", detail.getFbatchno(), detail.getFqty()); |
| | | dto.setFrob(detail.getFrob()); |
| | | dto.setFInterID(detail.getFinterid()); |
| | | if (DetlDto.has(list, dto)) { |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + detail.getFqty()); |
| | | } else { |
| | | list.add(dto); |
| | | } |
| | | } |
| | | for (DetlDto detlDto : list) { |
| | | Mat mat = matService.selectBySku(detlDto.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(detlDto.getMatnr() + "编号商品检索失败,请先添加商品"); |
| | | } |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setBatch(detlDto.getBatch()); |
| | | orderDetl.setAnfme(detlDto.getAnfme()); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setCreateBy(9527L); |
| | | orderDetl.setCreateTime(now); |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | orderDetl.setDeadWarn(detlDto.getFInterID()); |
| | | orderDetl.setInspect(detlDto.getFrob()); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("生成单据明细失败,请联系管理员"); |
| | | } |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | @Transactional |
| | | public ReturnT<String> readOutOrder(List<ExdOutstockSource> exdOutstockSource) { |
| | | String fbillno = exdOutstockSource.get(0).getFbillno(); |
| | | Integer ftrantype = exdOutstockSource.get(0).getFtrantype(); |
| | | Order order = orderService.selectByNo(fbillno); |
| | | // 如果单据不存在则添加;如果单据存在,作业中无法修改,反之则修改单据 |
| | | if (!Cools.isEmpty(order)) { |
| | | if (order.getSettle() > 1L) { |
| | | throw new CoolException(fbillno + "正在出库,无法修改单据"); |
| | | } |
| | | orderService.remove(order.getId()); |
| | | } |
| | | DocType docType = docTypeService.selectById(ftrantype); |
| | | Date now = new Date(); |
| | | // 单据主档 |
| | | order = new Order( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | fbillno, // 订单编号 |
| | | DateUtils.convert(now), // 单据日期 |
| | | docType.getDocId(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | null, // 客户编号 |
| | | null, // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | | null, // 优惠率 |
| | | null, // 优惠金额 |
| | | null, // 销售或采购费用合计 |
| | | null, // 实付金额 |
| | | null, // 付款类型 |
| | | null, // 业务员 |
| | | null, // 结算天数 |
| | | null, // 邮费支付类型 |
| | | null, // 邮费 |
| | | null, // 付款时间 |
| | | null, // 发货时间 |
| | | null, // 物流名称 |
| | | null, // 物流单号 |
| | | 1L, // 订单状态 |
| | | 1, // 状态 |
| | | 9527L, // 添加人员 |
| | | now, // 添加时间 |
| | | 9527L, // 修改人员 |
| | | now, // 修改时间 |
| | | null // 备注 |
| | | ); |
| | | if (!orderService.insert(order)) { |
| | | throw new CoolException("生成单据主档失败,请联系管理员"); |
| | | } |
| | | // 单据明细档 |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (ExdOutstockSource detail : exdOutstockSource) { |
| | | DetlDto dto = new DetlDto(detail.getFitemid()+"", detail.getFbatchno(), detail.getFqty()); |
| | | if (DetlDto.has(list, dto)) { |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + detail.getFqty()); |
| | | } else { |
| | | list.add(dto); |
| | | } |
| | | } |
| | | for (DetlDto detlDto : list) { |
| | | Mat mat = matService.selectBySku(detlDto.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(detlDto.getMatnr() + "编号商品检索失败,请先添加商品"); |
| | | } |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setBatch(detlDto.getBatch()); |
| | | orderDetl.setAnfme(detlDto.getAnfme()); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setCreateBy(9527L); |
| | | orderDetl.setCreateTime(now); |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("生成单据明细失败,请联系管理员"); |
| | | } |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://172.17.3.20:1433;databasename=ycawdasrs |
| | | # url: jdbc:sqlserver://127.0.0.1:1433;databasename=ycawdasrs |
| | | #jdbc-url: jdbc:sqlserver://172.17.3.20:1433;databasename=ycawdasrs |
| | | jdbc-url: jdbc:sqlserver://127.0.0.1:1433;databasename=ycawdasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| | |
| | | # jdbc-url: jdbc:mysql://127.0.0.1:3306/wmsdata |
| | | # username: root |
| | | # password: root |
| | | #driver-class-name: com.mysql.cj.jdbc.Driver |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=ycawdasrs |
| | | username: liku |
| | | password: 123456 |
| | | jdbc-url: jdbc:sqlserver://127.0.0.1:1433;databasename=wms_middle |
| | | username: sa |
| | | password: sa@123 |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath:mapper/*.xml |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdvYanbuMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdvYanbu"> |
| | | <result property="barcode" column="Barcode" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | Barcode |
| | | </sql> |
| | | </mapper> |
| New file |
| | |
| | | ¸!´;Ér-C>?ÍF=î°0+¢åxµ¬¨Zâ[ö¤±¼9}½ |
| | | ÑÅöıV]Aw"öcÚ{|Á=
&Y<±Æ¼û'W~à®í;\$Ì/H$ ÈB};
.º,X:YÒQc:æg&JªGf°Ö^½:6ÊKç¨\ß-Ì©ü78|ÃqÇoQÙcapÙxQUÆûÄP¤öoø$ü k¤|+js¾Vs)vz!áQÆ¥©ÍV³_uÂMùb"Õx±ú Îæ¾×lë-ÿ©M¬9MÚþÎeA]¤±*-cnµQRO5ÕkJBö¢¸´5Íñ _)£éöjQCú¢*liz©mN`}Þíìg$(ÿ¡?ë1òT}ïjÃÇP½±im½Ûò\¸Y«NÚþm(ÊÙ"d³BXc¿EÀÛB>ß[!QI:àº2Øt+Ykmdðîk^ôÁ.øôÑÀÆcHß¿:mU$,ýlÜQeqcµº¤µÖqåZ*òVØæ©$!BÖã}ÿY#NQ~ÜÈO6åïBƾo[&sC uDìw(È<VÀmå¡Qä^eÂðw{ø8ò{þqÛïû<¼¾;L×û±Yô_ôСW½b`=`ýÇÆwÒ.Ô¿ÓTløôÒßèÑ7QØËË |
| | | Y8¶òÒ[Yá
M.w8GÕéhÓwìèo
~óÎ^Û%Úe¼Ý^Ûéÿ)P
º,t»«f>°ºDD1t³,WmééhæÒU!ÚÁ;½´àTW |
| File was renamed from src/main/resources/mapper/LocDetlMapper.xml |
| | |
| | | </if> |
| | | |
| | | order by |
| | | DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | a.batch asc, a.anfme |
| | | desc, |
| | | NEWID(), |
| | | case |
| | |
| | | desc |
| | | </select> |
| | | |
| | | |
| | | <select id="queryStockAll" resultMap="BaseResultMap"> |
| | | select a.* |
| | | from asr_loc_detl a |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' |
| | | and a.matnr = #{matnr} |
| | | <!-- <choose>--> |
| | | <!-- <when test="batch != null and batch != ''">--> |
| | | <!-- and a.batch = #{batch}--> |
| | | <!-- </when>--> |
| | | <!-- <otherwise>--> |
| | | <!-- and (a.batch IS NULL OR a.batch = '')--> |
| | | <!-- </otherwise>--> |
| | | <!-- </choose>--> |
| | | <if test="batch != null and batch != ''"> |
| | | and a.batch = #{batch} |
| | | </if> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | and a.order_no = #{orderNo} |
| | | </if> |
| | | |
| | | <if test="locNos != null and locNos.size > 0"> |
| | | and b.loc_no not in |
| | | <foreach item="item" collection="locNos" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | order by |
| | | a.batch asc, a.anfme desc, |
| | | NEWID(), |
| | | case |
| | | when (left(a.loc_no, 2) = '01') then 0 |
| | | when (left(a.loc_no, 2) = '02') then 1 |
| | | when (left(a.loc_no, 2) = '03') then 1 |
| | | when (left(a.loc_no, 2) = '04') then 0 |
| | | when (left(a.loc_no, 2) = '05') then 0 |
| | | when (left(a.loc_no, 2) = '06') then 1 |
| | | when (left(a.loc_no, 2) = '07') then 1 |
| | | when (left(a.loc_no, 2) = '08') then 0 |
| | | when (left(a.loc_no, 2) = '09') then 0 |
| | | when (left(a.loc_no, 2) = '10') then 1 |
| | | when (left(a.loc_no, 2) = '11') then 1 |
| | | when (left(a.loc_no, 2) = '12') then 0 |
| | | when (left(a.loc_no, 2) = '13') then 0 |
| | | when (left(a.loc_no, 2) = '14') then 1 |
| | | when (left(a.loc_no, 2) = '15') then 1 |
| | | when (left(a.loc_no, 2) = '16') then 0 |
| | | when (left(a.loc_no, 2) = '17') then 0 |
| | | when (left(a.loc_no, 2) = '18') then 1 |
| | | when (left(a.loc_no, 2) = '19') then 1 |
| | | when (left(a.loc_no, 2) = '20') then 0 |
| | | when (left(a.loc_no, 2) = '21') then 0 |
| | | when (left(a.loc_no, 2) = '22') then 1 |
| | | when (left(a.loc_no, 2) = '23') then 1 |
| | | when (left(a.loc_no, 2) = '24') then 0 |
| | | when (left(a.loc_no, 2) = '25') then 0 |
| | | when (left(a.loc_no, 2) = '26') then 1 |
| | | when (left(a.loc_no, 2) = '27') then 1 |
| | | when (left(a.loc_no, 2) = '28') then 0 |
| | | when (left(a.loc_no, 2) = '29') then 0 |
| | | when (left(a.loc_no, 2) = '30') then 1 |
| | | when (left(a.loc_no, 2) = '31') then 1 |
| | | when (left(a.loc_no, 2) = '32') then 0 |
| | | when (left(a.loc_no, 2) = '33') then 0 |
| | | when (left(a.loc_no, 2) = '34') then 1 |
| | | when (left(a.loc_no, 2) = '35') then 1 |
| | | when (left(a.loc_no, 2) = '36') then 0 |
| | | when (left(a.loc_no, 2) = '37') then 0 |
| | | when (left(a.loc_no, 2) = '38') then 1 |
| | | when (left(a.loc_no, 2) = '39') then 1 |
| | | when (left(a.loc_no, 2) = '40') then 0 |
| | | when (left(a.loc_no, 2) = '41') then 0 |
| | | when (left(a.loc_no, 2) = '42') then 1 |
| | | when (left(a.loc_no, 2) = '43') then 1 |
| | | when (left(a.loc_no, 2) = '44') then 0 |
| | | when (left(a.loc_no, 2) = '45') then 0 |
| | | when (left(a.loc_no, 2) = '46') then 1 |
| | | when (left(a.loc_no, 2) = '47') then 1 |
| | | when (left(a.loc_no, 2) = '48') then 0 |
| | | else 0 |
| | | end |
| | | desc |
| | | </select> |
| | | |
| | | <select id="queryStockAnfme" resultType="java.lang.Double"> |
| | | select sum(anfme) as count from man_loc_detl |
| | | where 1=1 |
| File was renamed from src/main/resources/mapper/MatMapper.xml |
| | |
| | | <select id="selectByMatnr" resultMap="BaseResultMap"> |
| | | select top 1 * from man_mat where 1=1 and matnr = #{matnr} |
| | | </select> |
| | | |
| | | <select id="selectBySku" resultMap="BaseResultMap"> |
| | | select top 1 * from man_mat where 1=1 and sku = #{sku} |
| | | </select> |
| | | </mapper> |
| File was renamed from src/main/resources/mapper/OrderDetlMapper.xml |
| | |
| | | </choose> |
| | | </update> |
| | | |
| | | <update id="increaseWorkQty2"> |
| | | update man_order_detl |
| | | set work_qty = work_qty + #{workQty} |
| | | where 1=1 |
| | | and order_id = #{orderId} |
| | | and matnr = #{matnr} |
| | | <if test="color!=null and color!='' "> |
| | | and color = #{color} |
| | | </if> |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | </update> |
| | | |
| | | </mapper> |
| File was renamed from src/main/resources/mapper/OrderMapper.xml |
| | |
| | | where 1=1 |
| | | and settle = 4 |
| | | and status = 1 |
| | | and doc_type!=18 |
| | | and doc_type!=19 |
| | | order by create_time asc |
| | | </select> |
| | | |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdCustomerMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdCustomer"> |
| | | <id property="id" column="ID" /> |
| | | <result property="fnumber" column="Fnumber" /> |
| | | <result property="fname" column="Fname" /> |
| | | <result property="writetime" column="WriteTime" /> |
| | | <result property="writor" column="Writor" /> |
| | | <result property="status" column="Status" /> |
| | | <result property="readtime" column="ReadTime" /> |
| | | <result property="reador" column="Reador" /> |
| | | <result property="writormsg" column="WritorMsg" /> |
| | | <result property="readormsg" column="ReadorMsg" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID,Fnumber,Fname,WriteTime,Writor,Status, |
| | | ReadTime,Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdDepartmentMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdDepartment"> |
| | | <id property="id" column="ID" /> |
| | | <result property="fnumber" column="Fnumber" /> |
| | | <result property="fname" column="Fname" /> |
| | | <result property="writetime" column="WriteTime" /> |
| | | <result property="writor" column="Writor" /> |
| | | <result property="status" column="Status" /> |
| | | <result property="readtime" column="ReadTime" /> |
| | | <result property="reador" column="Reador" /> |
| | | <result property="writormsg" column="WritorMsg" /> |
| | | <result property="readormsg" column="ReadorMsg" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID,Fnumber,Fname,WriteTime,Writor,Status, |
| | | ReadTime,Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdEmpMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdEmp"> |
| | | <id property="id" column="ID" /> |
| | | <result property="fnumber" column="Fnumber" /> |
| | | <result property="fname" column="Fname" /> |
| | | <result property="writetime" column="WriteTime" /> |
| | | <result property="writor" column="Writor" /> |
| | | <result property="status" column="Status" /> |
| | | <result property="readtime" column="ReadTime" /> |
| | | <result property="reador" column="Reador" /> |
| | | <result property="writormsg" column="WritorMsg" /> |
| | | <result property="readormsg" column="ReadorMsg" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID,Fnumber,Fname,WriteTime,Writor,Status, |
| | | ReadTime,Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdInstockSourceMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdInstockSource"> |
| | | <id property="ID" column="ID" /> |
| | | <result property="finterid" column="FInterID" /> |
| | | <result property="fbillno" column="FBillNo" /> |
| | | <result property="ftrantype" column="FTranType" /> |
| | | <result property="fdate" column="FDate" /> |
| | | <result property="frob" column="FROB" /> |
| | | <result property="fdeptid" column="FDeptID" /> |
| | | <result property="fsupplyid" column="FSupplyID" /> |
| | | <result property="fbillerid" column="FBillerID" /> |
| | | <result property="fentryid" column="FEntryID" /> |
| | | <result property="fitemid" column="FItemID" /> |
| | | <result property="fqty" column="FQty" /> |
| | | <result property="fprice" column="Fprice" /> |
| | | <result property="fbatchno" column="FBatchNo" /> |
| | | <result property="funitid" column="FUnitID" /> |
| | | <result property="fsourcebillno" column="FSourceBillNo" /> |
| | | <result property="fsourceentryid" column="FSourceEntryID" /> |
| | | <result property="fsourceinterid" column="FSourceInterId" /> |
| | | <result property="fsourcetrantype" column="FSourceTranType" /> |
| | | <result property="fdcspid" column="FDCSPID" /> |
| | | <result property="fdcstockid" column="FDCStockID" /> |
| | | <result property="forderbillno" column="FOrderBillNo" /> |
| | | <result property="forderentryid" column="FOrderEntryID" /> |
| | | <result property="forderinterid" column="FOrderInterID" /> |
| | | <result property="fplanmode" column="FPlanMode" /> |
| | | <result property="writetime" column="WriteTime" /> |
| | | <result property="writor" column="Writor" /> |
| | | <result property="status" column="Status" /> |
| | | <result property="readtime" column="ReadTime" /> |
| | | <result property="reador" column="Reador" /> |
| | | <result property="writormsg" column="WritorMsg" /> |
| | | <result property="readormsg" column="ReadorMsg" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID,FInterID,FBillNo,FTranType,FDate,FROB, |
| | | FDeptID,FSupplyID,FBillerID,FEntryID,FItemID, |
| | | FQty,Fprice,FBatchNo,FUnitID,FSourceBillNo, |
| | | FSourceEntryID,FSourceInterId,FSourceTranType,FDCSPID,FDCStockID, |
| | | FOrderBillNo,FOrderEntryID,FOrderInterID,FPlanMode,WriteTime, |
| | | Writor,Status,ReadTime,Reador,WritorMsg, |
| | | ReadorMsg |
| | | </sql> |
| | | |
| | | <select id="listOrderNo" resultType="java.lang.String"> |
| | | select distinct fbillno |
| | | from Exd_Instock_Source |
| | | where status = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="listAll" resultType="com.zy.third.entity.ExdInstockSource"> |
| | | select * from Exd_Instock_Source where fbillno = #{orderNo} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdInstockTargetMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdInstockTarget"> |
| | | <id property="ID" column="ID" /> |
| | | <result property="finterid" column="FInterID" /> |
| | | <result property="fbillno" column="FBillNo" /> |
| | | <result property="ftrantype" column="FTranType" /> |
| | | <result property="fdate" column="FDate" /> |
| | | <result property="frob" column="FROB" /> |
| | | <result property="fuserid" column="FUserID" /> |
| | | <result property="fdeptid" column="FDeptID" /> |
| | | <result property="fsupplyid" column="FSupplyID" /> |
| | | <result property="fbillerid" column="FBillerID" /> |
| | | <result property="ffmanagerid" column="FFManagerID" /> |
| | | <result property="fsmanagerid" column="FSManagerID" /> |
| | | <result property="fentryid" column="FEntryID" /> |
| | | <result property="fitemid" column="FItemID" /> |
| | | <result property="fqty" column="FQty" /> |
| | | <result property="fprice" column="Fprice" /> |
| | | <result property="fbatchno" column="FBatchNo" /> |
| | | <result property="funitid" column="FUnitID" /> |
| | | <result property="fsourcebillno" column="FSourceBillNo" /> |
| | | <result property="fsourceentryid" column="FSourceEntryID" /> |
| | | <result property="fsourceinterid" column="FSourceInterId" /> |
| | | <result property="fsourcetrantype" column="FSourceTranType" /> |
| | | <result property="fdcspid" column="FDCSPID" /> |
| | | <result property="fdcstockid" column="FDCStockID" /> |
| | | <result property="forderbillno" column="FOrderBillNo" /> |
| | | <result property="forderentryid" column="FOrderEntryID" /> |
| | | <result property="forderinterid" column="FOrderInterID" /> |
| | | <result property="fplanmode" column="FPlanMode" /> |
| | | <result property="barcode" column="Barcode" /> |
| | | <result property="gross" column="Gross" /> |
| | | <result property="width" column="Width" /> |
| | | <result property="defects" column="Defects" /> |
| | | <result property="backcode" column="BackCode" /> |
| | | <result property="writetime" column="WriteTime" /> |
| | | <result property="writor" column="Writor" /> |
| | | <result property="status" column="Status" /> |
| | | <result property="readtime" column="ReadTime" /> |
| | | <result property="reador" column="Reador" /> |
| | | <result property="writormsg" column="WritorMsg" /> |
| | | <result property="readormsg" column="ReadorMsg" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID,FInterID,FBillNo,FTranType,FDate,FROB, |
| | | FUserID,FDeptID,FSupplyID,FBillerID,FFManagerID, |
| | | FSManagerID,FEntryID,FItemID,FQty,Fprice, |
| | | FBatchNo,FUnitID,FSourceBillNo,FSourceEntryID,FSourceInterId, |
| | | FSourceTranType,FDCSPID,FDCStockID,FOrderBillNo,FOrderEntryID, |
| | | FOrderInterID,FPlanMode,Barcode,Gross,Width, |
| | | Defects,BackCode,WriteTime,Writor,Status, |
| | | ReadTime,Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdMaterialMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdMaterial"> |
| | | <id property="id" column="ID"/> |
| | | <result property="fnumber" column="Fnumber"/> |
| | | <result property="fname" column="Fname"/> |
| | | <result property="fmodel" column="Fmodel"/> |
| | | <result property="writetime" column="WriteTime"/> |
| | | <result property="writor" column="Writor"/> |
| | | <result property="status" column="Status"/> |
| | | <result property="readtime" column="ReadTime"/> |
| | | <result property="reador" column="Reador"/> |
| | | <result property="writormsg" column="WritorMsg"/> |
| | | <result property="readormsg" column="ReadorMsg"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID |
| | | ,Fnumber,Fname,Fmodel,WriteTime,Writor, |
| | | Status,ReadTime,Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | <select id="listAll" resultType="com.zy.third.entity.ExdMaterial"> |
| | | select top 100 * |
| | | from Exd_Material |
| | | where status = 0 |
| | | </select> |
| | | |
| | | <select id="getBacode" resultType="com.zy.third.entity.ExdvYanbu" parameterType="string"> |
| | | <!-- |
| | | SELECT top 1 * |
| | | FROM [Textile].[trade].[TianfuQcResult] |
| | | where Barcode = #{barcode} |
| | | --> |
| | | SELECT top 1 * |
| | | FROM ExdV_Yanbu |
| | | where Barcode = #{barcode} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdOutstockSourceMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdOutstockSource"> |
| | | <id property="ID" column="ID" /> |
| | | <result property="finterid" column="FInterID" /> |
| | | <result property="fbillno" column="FBillNo" /> |
| | | <result property="ftrantype" column="FTranType" /> |
| | | <result property="fdate" column="FDate" /> |
| | | <result property="frob" column="FROB" /> |
| | | <result property="fdeptid" column="FDeptID" /> |
| | | <result property="fsupplyid" column="FSupplyID" /> |
| | | <result property="fbillerid" column="FBillerID" /> |
| | | <result property="fentryid" column="FEntryID" /> |
| | | <result property="fitemid" column="FItemID" /> |
| | | <result property="fqty" column="FQty" /> |
| | | <result property="fprice" column="Fprice" /> |
| | | <result property="fbatchno" column="FBatchNo" /> |
| | | <result property="funitid" column="FUnitID" /> |
| | | <result property="fsourcebillno" column="FSourceBillNo" /> |
| | | <result property="fsourceentryid" column="FSourceEntryID" /> |
| | | <result property="fsourceinterid" column="FSourceInterId" /> |
| | | <result property="fsourcetrantype" column="FSourceTranType" /> |
| | | <result property="fdcspid" column="FDCSPID" /> |
| | | <result property="fdcstockid" column="FDCStockID" /> |
| | | <result property="fscspid" column="FSCSPID" /> |
| | | <result property="fscstockid" column="FSCStockID" /> |
| | | <result property="forderbillno" column="FOrderBillNo" /> |
| | | <result property="forderentryid" column="FOrderEntryID" /> |
| | | <result property="forderinterid" column="FOrderInterID" /> |
| | | <result property="fplanmode" column="FPlanMode" /> |
| | | <result property="writetime" column="WriteTime" /> |
| | | <result property="writor" column="Writor" /> |
| | | <result property="status" column="Status" /> |
| | | <result property="readtime" column="ReadTime" /> |
| | | <result property="reador" column="Reador" /> |
| | | <result property="writormsg" column="WritorMsg" /> |
| | | <result property="readormsg" column="ReadorMsg" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID,FInterID,FBillNo,FTranType,FDate,FROB, |
| | | FDeptID,FSupplyID,FBillerID,FEntryID,FItemID, |
| | | FQty,Fprice,FBatchNo,FUnitID,FSourceBillNo, |
| | | FSourceEntryID,FSourceInterId,FSourceTranType,FDCSPID,FDCStockID, |
| | | FSCSPID,FSCStockID,FOrderBillNo,FOrderEntryID,FOrderInterID, |
| | | FPlanMode,WriteTime,Writor,Status,ReadTime, |
| | | Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | |
| | | |
| | | <select id="listOrderNo" resultType="java.lang.String"> |
| | | select distinct fbillno |
| | | from Exd_Outstock_Source |
| | | where status = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="listAll" resultType="com.zy.third.entity.ExdOutstockSource"> |
| | | select * from Exd_Outstock_Source where fbillno = #{orderNo} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdOutstockTargetMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdOutstockTarget"> |
| | | <id property="ID" column="ID" /> |
| | | <result property="finterid" column="FInterID" /> |
| | | <result property="fbillno" column="FBillNo" /> |
| | | <result property="ftrantype" column="FTranType" /> |
| | | <result property="fdate" column="FDate" /> |
| | | <result property="frob" column="FROB" /> |
| | | <result property="fuserid" column="FUserID" /> |
| | | <result property="fdeptid" column="FDeptID" /> |
| | | <result property="fsupplyid" column="FSupplyID" /> |
| | | <result property="fbillerid" column="FBillerID" /> |
| | | <result property="fentryid" column="FEntryID" /> |
| | | <result property="fitemid" column="FItemID" /> |
| | | <result property="fqtymust" column="FQtyMust" /> |
| | | <result property="fqty" column="FQty" /> |
| | | <result property="fprice" column="Fprice" /> |
| | | <result property="fbatchno" column="FBatchNo" /> |
| | | <result property="funitid" column="FUnitID" /> |
| | | <result property="fsourcebillno" column="FSourceBillNo" /> |
| | | <result property="fsourceentryid" column="FSourceEntryID" /> |
| | | <result property="fsourceinterid" column="FSourceInterId" /> |
| | | <result property="fsourcetrantype" column="FSourceTranType" /> |
| | | <result property="fdcspid" column="FDCSPID" /> |
| | | <result property="fdcstockid" column="FDCStockID" /> |
| | | <result property="fscspid" column="FSCSPID" /> |
| | | <result property="fscstockid" column="FSCStockID" /> |
| | | <result property="forderbillno" column="FOrderBillNo" /> |
| | | <result property="forderentryid" column="FOrderEntryID" /> |
| | | <result property="forderinterid" column="FOrderInterID" /> |
| | | <result property="fplanmode" column="FPlanMode" /> |
| | | <result property="barcode" column="Barcode" /> |
| | | <result property="gross" column="Gross" /> |
| | | <result property="width" column="Width" /> |
| | | <result property="defects" column="Defects" /> |
| | | <result property="backcode" column="BackCode" /> |
| | | <result property="writetime" column="WriteTime" /> |
| | | <result property="writor" column="Writor" /> |
| | | <result property="status" column="Status" /> |
| | | <result property="readtime" column="ReadTime" /> |
| | | <result property="reador" column="Reador" /> |
| | | <result property="writormsg" column="WritorMsg" /> |
| | | <result property="readormsg" column="ReadorMsg" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID,FInterID,FBillNo,FTranType,FDate,FROB, |
| | | FUserID,FDeptID,FSupplyID,FBillerID,FEntryID, |
| | | FItemID,FQtyMust,FQty,Fprice,FBatchNo, |
| | | FUnitID,FSourceBillNo,FSourceEntryID,FSourceInterId,FSourceTranType, |
| | | FDCSPID,FDCStockID,FSCSPID,FSCStockID,FOrderBillNo, |
| | | FOrderEntryID,FOrderInterID,FPlanMode,Barcode,Gross, |
| | | Width,Defects,BackCode,WriteTime,Writor, |
| | | Status,ReadTime,Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdSupplierMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdSupplier"> |
| | | <id property="id" column="ID" /> |
| | | <result property="fnumber" column="Fnumber" /> |
| | | <result property="fname" column="Fname" /> |
| | | <result property="writetime" column="WriteTime" /> |
| | | <result property="writor" column="Writor" /> |
| | | <result property="status" column="Status" /> |
| | | <result property="readtime" column="ReadTime" /> |
| | | <result property="reador" column="Reador" /> |
| | | <result property="writormsg" column="WritorMsg" /> |
| | | <result property="readormsg" column="ReadorMsg" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID,Fnumber,Fname,WriteTime,Writor,Status, |
| | | ReadTime,Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.third.mapper.ExdUserMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.third.entity.ExdUser"> |
| | | <id property="id" column="ID"/> |
| | | <result property="name" column="Name"/> |
| | | <result property="writetime" column="WriteTime"/> |
| | | <result property="writor" column="Writor"/> |
| | | <result property="status" column="Status"/> |
| | | <result property="readtime" column="ReadTime"/> |
| | | <result property="reador" column="Reador"/> |
| | | <result property="writormsg" column="WritorMsg"/> |
| | | <result property="readormsg" column="ReadorMsg"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | ID |
| | | ,Name,WriteTime,Writor,Status,ReadTime, |
| | | Reador,WritorMsg,ReadorMsg |
| | | </sql> |
| | | |
| | | |
| | | <select id="listAll" resultType="com.zy.third.entity.ExdUser"> |
| | | select top 100 * |
| | | from Exd_User |
| | | where status = 0 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | let data = tableCache[index]; |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | if (tableCache[i].locNo === data.locNo) { |
| | | tableCache[i]['staNo'] = Number(obj.elem.value); |
| | | tableCache[i]['staNo'] = obj.elem.value; |
| | | } |
| | | } |
| | | obj.othis.children().find("input").css("color", "blue"); |
| | |
| | | // 确认 |
| | | form.on('submit(staBatchSelectConfirm)', function (obj) { |
| | | let loadIdx = layer.load(2); |
| | | let batchSta = Number(obj.field.batchSta); |
| | | let batchSta = obj.field.batchSta; |
| | | let arr = []; |
| | | for (let j = 0; j<stoPreTabData.length; j++) { |
| | | for (let i = 0; i<tableCache.length; i++) { |
| New file |
| | |
| | | var pageCurr; |
| | | var insTb2; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | | notice: 'notice/notice', |
| | | }).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | var util = layui.util; |
| | | var notice = layui.notice; |
| | | var treeTable = layui.treeTable; |
| | | var xmSelect = layui.xmSelect; |
| | | var tableMerge = layui.tableMerge; |
| | | var tableX = layui.tableX; |
| | | |
| | | insTb2 = table.render({ |
| | | elem: '#orderDetlTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/orderDetl/pakout/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#orderDetToolbar', |
| | | height: 'full-120', |
| | | where: {order_id: 9999999999}, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{type: 'numbers', title: '#'} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160} |
| | | ,{field: 'matnr', align: 'center',title: '商品编码', width: 160} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} |
| | | ,{field: 'batch', align: 'center',title: '序列码'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | // ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'} |
| | | ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} |
| | | // ,{field: 'name', align: 'center',title: '名称'} |
| | | // ,{field: 'model', align: 'center',title: '型号'} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '商品条码', hide: true} |
| | | // ,{field: 'supplier', align: 'center',title: '供应商'} |
| | | // ,{field: 'unitPrice', align: 'center',title: '单价'} |
| | | // ,{field: 'itemNum', align: 'center',title: '品项数'} |
| | | // ,{field: 'count', align: 'center',title: '数量'} |
| | | // ,{field: 'weight', align: 'center',title: '重量'} |
| | | // ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | // ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | // ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | /* 表格2搜索 */ |
| | | form.on('submit(sensorTbSearch)', function (data) { |
| | | insTb2.reload({where: data.field, page: {curr: 1}}); |
| | | return false; |
| | | }); |
| | | |
| | | /* 表格2头工具栏点击事件 */ |
| | | table.on('toolbar(orderDetlTable)', function (obj) { |
| | | |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | if (obj.event === 'pakoutPreview') { // 添加 |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择至少一条出库明细', {icon: 2}); |
| | | return; |
| | | } |
| | | pakoutPreview(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | } else if (obj.event === 'del') { // 删除 |
| | | var checkRows = table.checkStatus('sensorTable'); |
| | | if (checkRows.data.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | var ids = checkRows.data.map(function (d) { |
| | | return d.id; |
| | | }); |
| | | doDelSensor({ids: ids}); |
| | | } |
| | | }); |
| | | |
| | | /* 表格2工具条点击事件 */ |
| | | table.on('tool(orderDetlTable)', function (obj) { |
| | | console.log(obj); |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 出库 |
| | | case 'pakoutPreview': |
| | | pakoutPreview([data.id]) |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | function pakoutPreview(ids) { |
| | | let loadIndex = layer.load(2); |
| | | console.log("1111") |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout2/preview/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify(ids), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | var tableCache; |
| | | if (res.code === 200){ |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: false |
| | | ,closeBtn: false |
| | | ,offset: '50px' |
| | | ,area: ['1200px', '700px'] |
| | | ,shade: 0.5 |
| | | ,shadeClose: false |
| | | ,btn: ['立即出库', '稍后处理'] |
| | | ,btnAlign: 'c' |
| | | ,moveType: 1 //拖拽模式,0或者1 |
| | | ,content: $('#pakoutPreviewBox').html() |
| | | ,success: function(layero, index){ |
| | | stoPreTabIdx = table.render({ |
| | | elem: '#stoPreTab', |
| | | data: res.data, |
| | | height: 520, |
| | | page: false, |
| | | limit: Number.MAX_VALUE, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | // {type: 'checkbox', merge: ['orderNo']}, |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'batch', title: '序列码', align: 'center'}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | //{field: 'staState', title: '状态', align: 'center'}, |
| | | {type: 'checkbox', merge: ['locNo']}, |
| | | ]], |
| | | done: function (res) { |
| | | tableMerge.render(this); |
| | | $('.layui-table-body.layui-table-main').css("overflow", "auto"); |
| | | tableCache = tableData = table.cache.stoPreTab; |
| | | } |
| | | }); |
| | | // 修改出库站 |
| | | form.on('select(tbBasicTbStaNos)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableCache[index]; |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | if (tableCache[i].locNo === data.locNo) { |
| | | tableCache[i]['staNo'] = obj.elem.value; |
| | | } |
| | | } |
| | | obj.othis.children().find("input").css("color", "blue"); |
| | | return false; |
| | | }); |
| | | // 批量修改出库站 |
| | | form.on('submit(batchModifySta)', function () { |
| | | let stoPreTabData = layui.table.checkStatus('stoPreTab').data; |
| | | if (stoPreTabData.length < 1) { |
| | | layer.msg("请至少选择一条以上合并数据", {icon: 7}); |
| | | return false; |
| | | } |
| | | modifySta(stoPreTabData); |
| | | }); |
| | | // 批量修改出库站 - 站点选择 |
| | | function modifySta(stoPreTabData) { |
| | | // 出库站取交集 |
| | | let staBatchSelectVal = []; |
| | | for(let i = 0; i<stoPreTabData.length; i++) { |
| | | let staNos = stoPreTabData[i].staNos; |
| | | if (staNos !== null) { |
| | | if (staBatchSelectVal.length === 0) { |
| | | staBatchSelectVal = staNos; |
| | | } else { |
| | | staBatchSelectVal = staBatchSelectVal.filter(val => |
| | | { |
| | | return new Set(staNos).has(val) |
| | | } |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | if (staBatchSelectVal.length === 0) { |
| | | layer.msg("出库站没有交集,无法批量修改", {icon: 2}); |
| | | return; |
| | | } |
| | | admin.open({ |
| | | type: 1, |
| | | area: '300px', |
| | | offset: 'auto', |
| | | title: '请选择站点', |
| | | content: $('#staBatchSelectDialog').html(), |
| | | success: function (layero, ddIndex) { |
| | | // 渲染下拉框 |
| | | let template = Handlebars.compile($('#batchStaSelectTpl').html()); |
| | | $('#batchSelectStaBox').html(template({list: staBatchSelectVal})); |
| | | // 确认 |
| | | form.on('submit(staBatchSelectConfirm)', function (obj) { |
| | | let loadIdx = layer.load(2); |
| | | let batchSta = obj.field.batchSta; |
| | | let arr = []; |
| | | for (let j = 0; j<stoPreTabData.length; j++) { |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | if (tableCache[i].orderNo === stoPreTabData[j].orderNo |
| | | && tableCache[i].matnr === stoPreTabData[j].matnr |
| | | && tableCache[i].locNo === stoPreTabData[j].locNo) { |
| | | tableCache[i]['staNo'] = batchSta; |
| | | arr.push(i); |
| | | } |
| | | } |
| | | } |
| | | stoPreTabIdx.reload({data: tableCache}); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .order-sta-select').val(batchSta); |
| | | }); |
| | | layui.form.render('select'); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue"); |
| | | }); |
| | | layer.close(loadIdx); layer.close(ddIndex); |
| | | return false; |
| | | }); |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | } |
| | | ,yes: function(index, layero){ |
| | | //按钮【立即出库】的回调 |
| | | let stoPreTabData = layui.table.checkStatus('stoPreTab').data; |
| | | if (stoPreTabData.length < 1) { |
| | | layer.msg("请至少选择一条数据进行出库", {icon: 7}); |
| | | return false; |
| | | } |
| | | pakout(stoPreTabData, index); |
| | | } |
| | | ,btn2: function(index, layero){ |
| | | //按钮【稍后处理】的回调 |
| | | layer.close(index) |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function pakout(tableCache, layerIndex) { |
| | | // let loadIndex = layer.load(2); |
| | | notice.msg('正在生成出库任务......', {icon: 4}); |
| | | console.info(tableCache); |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout2/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify(tableCache), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | notice.destroy(); |
| | | if (res.code === 200) { |
| | | layer.close(layerIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | insTb.reload({where: null}); |
| | | insTb2.reload({where: null, page: {curr: 1}}); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | /* 删除订单 */ |
| | | function doDelSensor(obj) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/sensor/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: obj.ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }); |
| | | } |
| | | |
| | | // 修改状态 |
| | | form.on('switch(statusSwitch)', function (obj) { |
| | | var index = obj.othis.parents('tr').attr("data-index"); |
| | | var data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?1:0; |
| | | http.post(baseUrl+"/sensor/edit/auth", {id: data.id, status: data[this.name]}, function (res) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | }) |
| | | }) |
| | | |
| | | window.pakoutPreview = pakoutPreview; |
| | | |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 一键出库 |
| | | */ |
| | | function autoOut(orderId) { |
| | | let loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false}); |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout/orderDetlIds/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { orderId : orderId }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | pakoutPreview(res.data); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | ,{field: 'mobile', align: 'center',title: '手机号'} |
| | | // ,{field: 'deptName', align: 'center',title: '所属部门'} |
| | | ,{field: 'roleName', align: 'center',title: '角色'} |
| | | ,{field: 'email', align: 'center',title: '邮箱'} |
| | | ,{field: 'email', align: 'center',title: 'ERP中用户id'} |
| | | // ,{field: 'sex$', align: 'center',title: '性别'} |
| | | ,{field: 'createTime$', align: 'center',title: '注册时间', hide: true} |
| | | ,{field: 'status$', align: 'center',title: '状态', templet: '#statusTpl', width: 120, unresize: true} |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/originTable.css" media="all"> |
| | | <style> |
| | | body { |
| | | color: #595959; |
| | | background-color: #f5f7f9; |
| | | } |
| | | |
| | | .admin-form { |
| | | padding: 25px 30px 0 0 !important; |
| | | margin: 0 !important; |
| | | } |
| | | |
| | | .layui-table-view .layui-table-cell .layui-select-title .layui-input { |
| | | height: 28px; |
| | | line-height: 28px; |
| | | } |
| | | |
| | | .layui-table-view [lay-size="lg"] .layui-table-cell .layui-select-title .layui-input { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | } |
| | | |
| | | .layui-table-view [lay-size="lg"] .layui-table-cell .layui-select-title .layui-input { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | } |
| | | |
| | | .layui-table-view [lay-size="sm"] .layui-table-cell .layui-select-title .layui-input { |
| | | height: 20px; |
| | | line-height: 20px; |
| | | } |
| | | |
| | | .layui-table-view [lay-size="sm"] .layui-table-cell .layui-btn-xs { |
| | | height: 18px; |
| | | line-height: 18px; |
| | | } |
| | | |
| | | /* 权限控制 */ |
| | | #btn-pakoutPreview { |
| | | display: none; |
| | | } |
| | | /*#btn-delete {*/ |
| | | /* display: none;*/ |
| | | /*}*/ |
| | | /*.btn-edit {*/ |
| | | /* display: none;*/ |
| | | /*}*/ |
| | | /*.btn-more {*/ |
| | | /* display: none;*/ |
| | | /*}*/ |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <!-- 正文开始 --> |
| | | <div class="layui-fluid" style="padding-bottom: 0;"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <!-- 左 --> |
| | | <div class="layui-col-md3" id="left-table"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <form class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline" style="max-width: 300px;"> |
| | | <input name="orderNo" class="layui-input" placeholder="输入单据编号" autocomplete="off"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn" lay-filter="originTableSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="originTbReset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <table id="originTable" lay-filter="originTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 右 --> |
| | | <div class="layui-col-md9"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <form class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">商品编码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="matnr" class="layui-input" placeholder="商品编码"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">商品名称:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="maktx" class="layui-input" placeholder="商品名称"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">序列码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="batch" class="layui-input" placeholder="序列码"/> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <label class="layui-form-label">状态:</label>--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <select name="isOnline">--> |
| | | <!-- <option value="1">充电中</option>--> |
| | | <!-- <option value="1">充电中</option>--> |
| | | <!-- <option value="0">不在充电</option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="sensorTbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <table id="orderDetlTable" lay-filter="orderDetlTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 头工具栏 --> |
| | | <script type="text/html" id="orderDetToolbar"> |
| | | |
| | | <!-- <div class="layui-btn-container">--> |
| | | <!-- <div class="layui-col-md3">--> |
| | | <!-- <select id="staNoSelect" lay-verify="required">--> |
| | | <!-- <option value="">请选择站点</option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger btn-pakoutPreview" id="btn-pakoutPreview" lay-event="pakoutPreview">批量出库</button> |
| | | |
| | | </script> |
| | | |
| | | <!-- 行工具栏 --> |
| | | <script type="text/html" id="operate"> |
| | | {{#if (d.anfme > d.qty){ }} |
| | | <a class="layui-btn layui-btn-xs layui-btn-danger btn-pakoutPreview" lay-event="pakoutPreview"><i class="layui-icon layui-icon-prev-circle"></i>出库</a> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <!-- 出库预览 --> |
| | | <script type="text/html" id="pakoutPreviewBox" style="display: none"> |
| | | <div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;"> |
| | | <span style="font-size: large; font-weight: bold">出库预览</span> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px"> |
| | | <table id="stoPreTab" lay-filter="stoPreTab"></table> |
| | | </div> |
| | | <button class="layui-btn layui-btn-primary layui-border-black layui-btn-sm" lay-filter="batchModifySta" lay-submit style="display: block;float: right;margin-right: 1rem"> |
| | | 批量修改 |
| | | </button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="tbBasicTbStaNos"> |
| | | <div class="ew-select-fixed"> |
| | | <select class="order-sta-select" lay-filter="tbBasicTbStaNos"> |
| | | {{#if (d.staNos!=null) {}} |
| | | {{# for(let i=0; i<d.staNos.length; i++) { }} |
| | | <option value="{{d.staNos[i]}}">{{d.staNos[i]}}</option> |
| | | {{# } }} |
| | | {{# } }} |
| | | </select> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="staBatchSelectDialog"> |
| | | <form class="layui-form" style="padding: 25px 50px 30px 50px;text-align: center"> |
| | | <select id="batchSelectStaBox" name="batchSta" lay-vertype="tips" lay-verify="required" required=""> |
| | | </select> |
| | | <button style="margin-top: 30px" class="layui-btn" lay-filter="staBatchSelectConfirm" lay-submit="">确定</button> |
| | | </form> |
| | | </script> |
| | | |
| | | <script type="text/html" id="locNoTpl"> |
| | | <span name="locNo" |
| | | {{# if( d.lack === false){ }} |
| | | class="layui-badge layui-badge-green" >{{d.locNo}}</span> |
| | | {{# } else { }} |
| | | class="layui-badge layui-badge-red" >库存不足</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <!-- 行样式 --> |
| | | <script type="text/html" id="orderNoTpl"> |
| | | <span name="orderNo" class="layui-badge layui-badge-gray">{{d.orderNo}}</span> |
| | | </script> |
| | | <script type="text/html" id="statusTpl"> |
| | | <input type="checkbox" name="status" value="{{d.status}}" lay-skin="switch" lay-text="正常|禁用" lay-filter="statusSwitch" {{ d.status === 1 ? 'checked' : '' }}> |
| | | </script> |
| | | |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form"> |
| | | <input name="id" type="hidden"> |
| | | <input name="status" type="hidden"> |
| | | <div class="layui-row"> |
| | | |
| | | <div class="layui-col-md4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">设备编号</label> |
| | | <div class="layui-input-block"> |
| | | <input name="uuid" placeholder="请输入设备编号" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">设备类型:</label> |
| | | <div class="layui-input-block"> |
| | | <div id="modelSel" class="ew-xmselect-tree"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md4"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">所属项目: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input name="hostId" class="layui-input" style="display: none"> |
| | | <input id="hostId$" name="hostId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请选择所属项目" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="hostQueryByhostId" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="hostQueryByhostIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">详细地址</label> |
| | | <div class="layui-input-block"> |
| | | <input name="addr" placeholder="请输入详细地址" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-col-md12" style="text-align: center"> |
| | | <iframe id="mapIframe" src="map.html" scrolling="no" frameborder="0" |
| | | style="display: inline-block; width: 90%;height: 400px;margin: auto"> |
| | | </iframe> |
| | | </div> |
| | | |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript" src="../../static/js/orderTable.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/order/outAll.js?v=1" charset="utf-8"></script> |
| | | <!--<script type="text/template" id="takeSiteSelectTemplate">--> |
| | | <!-- {{#each data}}--> |
| | | <!-- <option value="{{siteId}}">{{desc}}</option>--> |
| | | <!-- {{/each}}--> |
| | | <!--</script>--> |
| | | <!-- 项目编辑窗口 --> |
| | | <script type="text/html" id="hostEditDialog"> |
| | | <form id="hostEditForm" lay-filter="hostEditForm" class="layui-form model-form"> |
| | | <input name="id" type="hidden"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">项目名称:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="name" placeholder="请输入类型名称" class="layui-input" |
| | | lay-verType="tips" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="hostEditSubmit" lay-submit>保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | |
| | | </body> |
| | | |
| | | <script type="text/template" id="batchStaSelectTpl"> |
| | | <option value="">选择出库站</option> |
| | | {{#each list}} |
| | | <option value="{{this}}">{{this}}</option> |
| | | {{/each}} |
| | | </script> |
| | | |
| | | </html> |
| | | |
| | |
| | | <input name="mobile" placeholder="请输入手机号" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">邮箱</label> |
| | | <div class="layui-input-block"> |
| | | <input name="email" placeholder="请输入邮箱" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">邮箱</label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input name="email" placeholder="请输入邮箱" class="layui-input">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | </div> |
| | | </div> |