From 5fb40915c3befe0471656bffb2c03dad6506508a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A4=E9=94=A6=E7=A7=91?= <32996823@qq.com> Date: Fri, 29 Nov 2024 09:16:50 +0800 Subject: [PATCH] tjk --- .../com/ktg/mes/md/controller/BaseKnifeController.java | 7 +++++-- .../com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java | 7 ++----- .../com/ktg/mes/wm/controller/WmsInTaskController.java | 4 ++-- .../com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java | 1 + 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java index 0eb8eb8..1956d28 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java @@ -906,8 +906,8 @@ public class BaseKnifeController extends BaseController { wmsInPlanTemp.setCellCode(zdTask.getAttr3()); wmsInPlanTemp.setPlanCode(zdTask.getAttr4() == null ? zdTask.getCode() : zdTask.getAttr4()); wmsInPlanTemp.setRelBillCode("组装单据"); - wmsInPlanTemp.setPlanTypeId(13L); - wmsInPlanTemp.setPlanTypeCode("ZDRK"); + wmsInPlanTemp.setPlanTypeId(9L); + wmsInPlanTemp.setPlanTypeCode("ZDHK"); wmsInPlanTemp.setCreateBy(getUsername()); wmsInPlanTemp.setCreateTime(DateUtils.getNowDate()); @@ -955,6 +955,7 @@ public class BaseKnifeController extends BaseController { wmsInTask.setBatch(batchNum); wmsInTask.setMaterialId(zdTask.getmProductId().toString()); wmsInTask.setPlanTypeId("9"); + wmsInTask.setPlanTypeCode("ZDHK"); wmsInTask.setPlanInStatus("1"); wmsInTaskService.insertWmsInTask(wmsInTask); @@ -1021,6 +1022,7 @@ public class BaseKnifeController extends BaseController { @Log(title = "工具台账", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody BaseKnife baseKnife) { + baseKnife.setCreateBy(getUsername()); return toAjax(baseKnifeService.insertBaseKnife(baseKnife)); } @@ -1031,6 +1033,7 @@ public class BaseKnifeController extends BaseController { @Log(title = "工具台账", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody BaseKnife baseKnife) { + baseKnife.setUpdateBy(getUsername()); return toAjax(baseKnifeService.updateBaseKnife(baseKnife)); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java index a034a49..19db822 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java @@ -25,8 +25,6 @@ import java.io.File; import java.text.SimpleDateFormat; import java.util.*; -import static org.apache.commons.lang3.SystemUtils.getUserName; - /** * 工具台账Service业务层处理 * @@ -128,7 +126,8 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService { if ("PRODUCT".equals(nowWmsOutPlanDetailEntity.getItemOrProduct())) { try { // File xmlFile = new File(myConfig.getToolSettingXmlPath() + nowBaseKnife.getRfid() + ".xml"); - File xmlFile = new File(myConfig.getToolSettingXmlPath() + "DDYDATA0" + (new Random().nextInt(5) + 1) + ".xml"); + File xmlFile = new File("\\\\DBJGJG24\\ddy\\aaa.xml"); +// File xmlFile = new File(myConfig.getToolSettingXmlPath() + "DDYDATA0" + (new Random().nextInt(5) + 1) + ".xml"); JAXBContext jaxbContext = JAXBContext.newInstance(Tools.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); Tools paramXml = (Tools) unmarshaller.unmarshal(xmlFile); @@ -179,7 +178,6 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService { @Override public int insertBaseKnife(BaseKnife baseKnife) { baseKnife.setCreateTime(DateUtils.getNowDate()); - baseKnife.setCreateBy(getUserName()); int rows = baseKnifeMapper.insertBaseKnife(baseKnife); return rows; } @@ -194,7 +192,6 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService { @Override public int updateBaseKnife(BaseKnife baseKnife) { baseKnife.setUpdateTime(DateUtils.getNowDate()); - baseKnife.setUpdateBy(getUserName()); return baseKnifeMapper.updateBaseKnife(baseKnife); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java index c6da6bb..ce3fa03 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java @@ -155,7 +155,7 @@ public class WmsInTaskController extends BaseController { * 执行入库任务 */ // @PreAuthorize("@ss.hasPermi('wm:wmsInTask:issueBatch')") - @Log(title = "入库任务", businessType = BusinessType.UPDATE) +// @Log(title = "入库任务", businessType = BusinessType.UPDATE) @PostMapping("/open/issueBatch/{ids}") @ResponseBody @Transactional @@ -341,7 +341,7 @@ public class WmsInTaskController extends BaseController { outPlan.setWmsBusinessTypeId(16L); outPlan.setPlanState("1"); outPlan.setPlanType("ZDCK"); - outPlan.setCreateBy(getUsername()); +// outPlan.setCreateBy(getUsername()); outPlan.setCreateTime(DateUtils.getNowDate()); wmsOutPlanMapper.insertWmsOutPlan(outPlan); diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java index 4d25949..8fe0439 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java @@ -443,6 +443,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService wmsInTask.setBatch(batchNum); wmsInTask.setMaterialId(zdTask.getmProductId().toString()); wmsInTask.setPlanTypeId("9"); + wmsInTask.setPlanTypeCode("ZDHK"); wmsInTask.setPlanInStatus("0"); wmsInTask.setDetailInId(wmsInPlan.getWmsInPlanDetailsList().get(0).getDetailsId()); wmsInTask.setCreateBy(getUsername());