From 5ec06e72f39cae4dd599af6aa798c84c1919528b Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 06 九月 2022 15:00:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/zypms' into zypms --- src/main/webapp/static/js/itemTable.js | 4 +++- src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java | 22 ++++++++++++++++++++++ src/main/java/zy/cloud/wms/manager/entity/Item.java | 10 ++++++++++ src/main/java/zy/cloud/wms/manager/controller/ItemController.java | 10 ++++++---- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/src/main/java/zy/cloud/wms/manager/controller/ItemController.java b/src/main/java/zy/cloud/wms/manager/controller/ItemController.java index 66f00ba..b654267 100644 --- a/src/main/java/zy/cloud/wms/manager/controller/ItemController.java +++ b/src/main/java/zy/cloud/wms/manager/controller/ItemController.java @@ -115,9 +115,7 @@ /** * 鎺х */ - if (Cools.isEmpty(item.getHostId()) || item.getHostId() == 0){ - item.setHostId(1L); - } + if (Cools.isEmpty(item)) { return R.error("鍙傛暟涓虹┖,璇疯仈绯荤鐞嗗憳"); } @@ -145,7 +143,11 @@ item.setCustMan(cstmr.getName()); item.setCustMobile(cstmr.getTel()); item.setCustAdress(cstmr.getAddr()); - item.setHostId(getHostId()); + if (Cools.isEmpty(item.getHostId()) || item.getHostId() == 0){ + item.setHostId(1L); + }else { + item.setHostId(getHostId()); + } item.setCreateBy(getUserId()); item.setCreateTime(new Date()); item.setStatus(1); diff --git a/src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java b/src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java index bf3c45a..d604117 100644 --- a/src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java +++ b/src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java @@ -18,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.*; @RestController @@ -126,6 +129,25 @@ return R.ok(); } + @RequestMapping("/projectPlan/update/homepage") + public R updateByHomepage(@RequestParam HashMap<String,Object> param){ + String itemId = (String) param.get("itemId"); + String weightNum = (String) param.get("weightNum"); + String realStartTime = (String) param.get("realStartTime"); + String realEndTime = (String) param.get("realEndTime"); + ProjectPlan projectPlan = projectPlanService.selectOne(new EntityWrapper<ProjectPlan>() + .eq("item_id", itemId) + .eq("weight_num", weightNum)); + try { + projectPlan.setRealStartTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(realStartTime)); + projectPlan.setRealEndTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(realEndTime)); + } catch (ParseException e) { + throw new RuntimeException(e); + } + projectPlanService.updateById(projectPlan); + return R.ok(); + } + @RequestMapping(value = "/projectPlan/delete/auth") @ManagerAuth public R delete(@RequestParam(value = "ids[]") Long[] ids) { diff --git a/src/main/java/zy/cloud/wms/manager/entity/Item.java b/src/main/java/zy/cloud/wms/manager/entity/Item.java index 46291cd..304ce74 100644 --- a/src/main/java/zy/cloud/wms/manager/entity/Item.java +++ b/src/main/java/zy/cloud/wms/manager/entity/Item.java @@ -150,6 +150,7 @@ + @TableField(value = "real_start_time", strategy = FieldStrategy.IGNORED) @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date realStartTime; @@ -690,6 +691,15 @@ return null; } + public String getType$$(){ + if (this.type.equals("10")) { + return "闆嗘垚椤圭洰"; + }else { + return "甯歌椤圭洰"; + } + + } + public void setUpdateBy(Long updateBy) { this.updateBy = updateBy; } diff --git a/src/main/webapp/static/js/itemTable.js b/src/main/webapp/static/js/itemTable.js index 979a894..2cb36a9 100644 --- a/src/main/webapp/static/js/itemTable.js +++ b/src/main/webapp/static/js/itemTable.js @@ -42,7 +42,9 @@ cols: [[ {field: 'uuid', title: '璁㈠崟鍙�', width: 100, align: 'center'}, {field: 'inUuid', title: '椤圭洰缂栧彿'}, - {field: 'name', title: '椤圭洰鍚嶇О'} + {field: 'name', title: '椤圭洰鍚嶇О'}, + {field: 'type$$', title: '椤圭洰绫诲瀷'} + ]], done: function (res, curr, count) { $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); -- Gitblit v1.9.1