diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index 5249b172..8fbd5977 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -330,7 +330,7 @@ public class PageController { Map paramForTask = new HashMap<>(); paramForTask.put("isDone", 0); - paramForTask.put("userId", userToken.getId()); + paramForTask.put("departmentHead", userToken.getNumber()); // 定义任务列表 List list = new ArrayList<>(); @@ -378,7 +378,7 @@ public class PageController { if (role == null) { role = 1; } - if (role == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -444,7 +444,7 @@ public class PageController { if (role == null) { role = 1; } - if (role == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -465,7 +465,7 @@ public class PageController { if (isadmin == null) { isadmin = 1; } - if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -667,7 +667,7 @@ public class PageController { } List materialTypeAll = materialTypeService.findMaterialTypeByCondition(map); mv.addObject("materialTypes", materialTypeAll); - if (role == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + if (role == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -781,7 +781,7 @@ public class PageController { if (isadmin == null) { isadmin = 1; } - if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -798,7 +798,7 @@ public class PageController { if (isadmin == null) { isadmin = 1; } - if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -903,7 +903,7 @@ public class PageController { if (isadmin == null) { isadmin = 1; } - if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -936,7 +936,7 @@ public class PageController { } @GetMapping("/group_edit") - public ModelAndView groupEdit(Integer id,HttpServletRequest request) { + public ModelAndView groupEdit(Integer id, HttpServletRequest request) { ModelAndView mv = new ModelAndView(); mv.setViewName("pages/group/group_edit"); Group group = groupService.findGroupOnlyById(id); @@ -945,7 +945,7 @@ public class PageController { if (isadmin == null) { isadmin = 1; } - if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(), 361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -1075,7 +1075,7 @@ public class PageController { @GetMapping("/user_add") - public ModelAndView user_add(Integer userId,Integer classes, HttpServletRequest request) { + public ModelAndView user_add(Integer userId, Integer classes, HttpServletRequest request) { UserByPort userToken = (UserByPort) request.getAttribute("userToken"); ModelAndView mv = new ModelAndView(); mv.setViewName("pages/user/user-add"); @@ -1188,7 +1188,7 @@ public class PageController { mv.addObject("id", id); Place placeById = placeService.findPlaceById(id); mv.addObject("place", placeById); - if(Integer.compare(placeById.getFlagForType(),2)==0){ + if (Integer.compare(placeById.getFlagForType(), 2) == 0) { // 如果是托盘 mv.setViewName("pages/place/place_editForTray"); } @@ -1268,6 +1268,7 @@ public class PageController { /** * 用于跳转到仓库管理员 + * * @param id * @return */ @@ -1281,6 +1282,7 @@ public class PageController { /** * 用于跳转到入库申请审核时的赋权 + * * @param id * @return */ @@ -1293,7 +1295,7 @@ public class PageController { } @GetMapping("/postRoleView") - public ModelAndView findPostRoleView(Integer id,Integer classes) { + public ModelAndView findPostRoleView(Integer id, Integer classes) { ModelAndView mv = new ModelAndView(); mv.addObject("postId", id); mv.addObject("classes", classes); @@ -1476,9 +1478,9 @@ public class PageController { ApplicationInRecordP applicationInRecordPById = depositoryRecordService.findApplicationInRecordPById(id); String airapproverTime = applicationInRecordPById.getAirapproverTime(); - if(airapproverTime != null && !"".equals(airapproverTime)){ - airapproverTime = DateUtil.TimeStampToDateTime(Long.valueOf(airapproverTime)); - applicationInRecordPById.setAirapproverTime(airapproverTime); + if (airapproverTime != null && !"".equals(airapproverTime)) { + airapproverTime = DateUtil.TimeStampToDateTime(Long.valueOf(airapproverTime)); + applicationInRecordPById.setAirapproverTime(airapproverTime); } // 获取入库库位id @@ -1489,12 +1491,12 @@ public class PageController { placeCode = placeById.getCode(); } Integer flagForGroup = applicationInRecordPById.getFlagForGroup(); - if(Integer.compare(applicationInRecordPById.getAirapproverPass(),4) != 0){ + if (Integer.compare(applicationInRecordPById.getAirapproverPass(), 4) != 0) { String[] airapproverId = applicationInRecordPById.getAirapproverId().split(","); StringBuilder airapproverName = new StringBuilder(); - for (String approverId:airapproverId + for (String approverId : airapproverId ) { - if(!"".equals(approverId)){ + if (!"".equals(approverId)) { UserByPort userByPort = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(approverId), userToken); airapproverName.append(userByPort.getName()).append(","); } @@ -1541,7 +1543,7 @@ public class PageController { ApplicationInRecordP applicationInRecordPById = depositoryRecordService.findApplicationInRecordPById(id); String airapproverTime = applicationInRecordPById.getAirapproverTime(); - if(airapproverTime != null && !"".equals(airapproverTime)){ + if (airapproverTime != null && !"".equals(airapproverTime)) { airapproverTime = DateUtil.TimeStampToDateTime(Long.valueOf(airapproverTime)); applicationInRecordPById.setAirapproverTime(airapproverTime); } @@ -1554,12 +1556,12 @@ public class PageController { placeCode = placeById.getCode(); } Integer flagForGroup = applicationInRecordPById.getFlagForGroup(); - if(Integer.compare(applicationInRecordPById.getAirapproverPass(),4) != 0){ + if (Integer.compare(applicationInRecordPById.getAirapproverPass(), 4) != 0) { String[] airapproverId = applicationInRecordPById.getAirapproverId().split(","); StringBuilder airapproverName = new StringBuilder(); - for (String approverId:airapproverId + for (String approverId : airapproverId ) { - if(!"".equals(approverId)){ + if (!"".equals(approverId)) { UserByPort userByPort = LinkInterfaceUtil.FindUserById(ObjectFormatUtil.toInteger(approverId), userToken); airapproverName.append(userByPort.getName()).append(","); } @@ -1597,8 +1599,6 @@ public class PageController { } - - @GetMapping("/form_step_lookByminRecordOut") public ModelAndView form_step_lookByminRecordOut(Integer id, HttpServletRequest request) { UserByPort userToken = (UserByPort) request.getAttribute("userToken"); @@ -1866,28 +1866,20 @@ public class PageController { // 负责人姓名 StringBuilder managerName = new StringBuilder(); String[] split = stp.getDepartmentManager().split(","); - for (int i = 0; i < split.length; i++) { - String s = split[i]; + for (String s : split) { if ("".equals(s)) { continue; } UserByPort manager = PortConfig.findUserByPortByNumber(s); - managerName.append(manager.getName() + ","); + managerName.append(manager.getName()).append(","); } stp.setDepartmentManagerName(managerName.toString()); // 获取盘点位置 - Integer placeId = stockTaking.getPlaceId(); - StringBuilder location = new StringBuilder(); Depository depository = depositoryService.findDepositoryById(stockTaking.getDepositoryId()); - location.append(depository.getDname()); - if (!(Integer.compare(placeId, 0) == 0)) { - // 如果不是默认库位 - Place placeById = placeService.findPlaceById(placeId); - location.append("-" + placeById.getCode()); - } + String location = depository.getDname(); // 设置盘点位置 - stp.setDepositoryName(location.toString()); + stp.setDepositoryName(location); mv.addObject("mainRecord", stp); mv.addObject("recordChild", stockTakingChildPByMainId); Integer departmentManagerState = stp.getDepartmentManagerState(); @@ -1956,15 +1948,8 @@ public class PageController { stp.setDepartmentManagerName(managerName.toString()); // 获取盘点位置 - Integer placeId = stockTaking.getPlaceId(); - StringBuilder location = new StringBuilder(); Depository depository = depositoryService.findDepositoryById(stockTaking.getDepositoryId()); - location.append(depository.getDname()); - if (!(Integer.compare(placeId, 0) == 0)) { - // 如果不是默认库位 - Place placeById = placeService.findPlaceById(placeId); - location.append("-").append(placeById.getCode()); - } + String location = depository.getDname(); // 设置盘点位置 stp.setDepositoryName(location.toString()); mv.addObject("mainRecord", stp); @@ -1996,7 +1981,6 @@ public class PageController { } - public List findAllCompany(UserByPort userByPort) { String url = PortConfig.external_url + "/org/govlist"; Map map = new HashMap<>(); @@ -2195,7 +2179,7 @@ public class PageController { // 跳转到添加权限界面 @GetMapping("/postRoleAdd") - public ModelAndView PostRoleAdd(Integer id,Integer classes, HttpServletRequest request) { + public ModelAndView PostRoleAdd(Integer id, Integer classes, HttpServletRequest request) { UserByPort userToken = (UserByPort) request.getAttribute("userToken"); ModelAndView mv = new ModelAndView(); mv.setViewName("pages/post/postRole_add"); @@ -2508,7 +2492,7 @@ public class PageController { // 获取主订单 stockTaking = stockTakingService.findStockTakingById(stcp.getMainId()); - Integer placeId = stockTaking.getPlaceId(); + Integer placeId = stcp.getMid(); // 获取库位详情 Place placeById = placeService.findPlaceById(placeId); diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/StockTakingController.java b/src/main/java/com/dreamchaser/depository_manage/controller/StockTakingController.java index 2de8b57d..1c3379ed 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/StockTakingController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/StockTakingController.java @@ -345,7 +345,7 @@ public class StockTakingController { } param.put("newInventory", newInventory); param.put("depositoryId",map.get("depositoryId")); - param.put("placeId",map.get("placeId")); + param.put("placeId",placeAndMaterial.getPid().toString()); param.put("departmentManager",map.get("departmentManager")); param.put("state",3); param.put("departmentManagerState",3); diff --git a/src/main/java/com/dreamchaser/depository_manage/entity/StockTaking.java b/src/main/java/com/dreamchaser/depository_manage/entity/StockTaking.java index eb8d557d..431f9381 100644 --- a/src/main/java/com/dreamchaser/depository_manage/entity/StockTaking.java +++ b/src/main/java/com/dreamchaser/depository_manage/entity/StockTaking.java @@ -26,11 +26,6 @@ public class StockTaking { /** * 盘点仓库 */ - private Integer placeId; - - /** - * 盘点库位 - */ private Integer depositoryId; /** diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml b/src/main/java/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml index cd130a4d..9f64557e 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml @@ -9,10 +9,9 @@ - - + @@ -36,6 +35,7 @@ + @@ -44,21 +44,20 @@ - st.id,st.code,st.depositoryId,st.placeId,st.departmentManager,st.state,st.createTime,st.originator,st.completeTime,st.reviewTime,st.auditOpinion,st.departmentManagerState + st.id,st.code,st.depositoryId,st.departmentManager,st.state,st.createTime,st.originator,st.completeTime,st.reviewTime,st.auditOpinion,st.departmentManagerState - id,mid,oldInventory,newInventory,inventory,mainId,takingResult,mname,mtId,tname,mcode,mversion,munit,mtexture,producedDate,stcUnit + id,mid,oldInventory,newInventory,inventory,mainId,takingResult,mname,mtId,tname,mcode,mversion,munit,mtexture,producedDate,stcUnit,pid - INSERT INTO stocktaking (id,code,depositoryId,placeId,departmentManager,state,createTime,originator,departmentManagerState) + INSERT INTO stocktaking (id,code,depositoryId,departmentManager,state,createTime,originator,departmentManagerState) values ( #{id}, #{code}, #{depositoryId}, - #{placeId}, #{departmentManager}, #{state}, #{createTime}, @@ -69,9 +68,9 @@ - INSERT INTO stocktakingchild (id,mid,oldInventory,newInventory,takingResult,inventory,mainId,producedDate,unit) + INSERT INTO stocktakingchild (id,mid,oldInventory,newInventory,takingResult,inventory,mainId,producedDate,unit,pid) values ( - #{id},#{mid},#{oldInventory},#{newInventory},#{takingResult},#{inventory},#{mainId},#{producedDate},#{unit} + #{id},#{mid},#{oldInventory},#{newInventory},#{takingResult},#{inventory},#{mainId},#{producedDate},#{unit},#{placeId} ) @@ -109,9 +108,6 @@ depositoryId = #{depositoryId}, - - placeId = #{placeId}, - departmentManager = #{departmentManager}, @@ -166,9 +162,13 @@ producedDate = #{producedDate}, + + pid = #{placeId}, + unit = #{unit} + where id = #{id} @@ -202,9 +202,7 @@ and st.depositoryId = #{depositoryId} - - and st.placeId = #{placeId} - + and st.departmentManagerState = #{departmentManagerState} @@ -232,6 +230,9 @@ and newInventory = #{newInventory} + + and pid = #{placeId} + and takingResult = #{takingResult} @@ -287,10 +288,10 @@ from stocktaking st where 1 = 1 - and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) + and (state = 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) - and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) + and (state != 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) ORDER BY st.createTime desc diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingChildP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingChildP.java index dda329d4..c187293b 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingChildP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingChildP.java @@ -19,6 +19,12 @@ public class StockTakingChildP { * 物料id */ private Integer mid; + + + /** + * 盘点库位id + */ + private Integer pid; /** * 库存容量 */ diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingP.java index 304ddb2b..fb0a49ce 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingP.java @@ -95,7 +95,6 @@ public class StockTakingP { this.code = st.getCode(); this.departmentManager = st.getDepartmentManager(); this.depositoryId = st.getDepositoryId(); - this.placeId = st.getPlaceId(); this.state = st.getState(); this.departmentManagerState = st.getDepartmentManagerState(); this.createTime = DateUtil.TimeStampToDateTime(st.getCreateTime()); diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java index 9dc8b5e1..ca774faf 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java @@ -280,23 +280,12 @@ public class QyWxOperationService { StringBuilder stockTakingResult = new StringBuilder(); // 物料盘盈数量 StringBuilder stockTakingInventory = new StringBuilder(); - // 获取盘点的库位 - Integer placeId = mainRecord.getPlaceId(); - Place place = placeMapper.findPlaceById(placeId); // 获取盘点的仓库 Integer depositoryId = mainRecord.getDepositoryId(); Depository depository = depositoryMapper.findDepositoryById(depositoryId); Location.append(depository.getDname()); - if (Integer.compare(0, placeId) == 0) { - // 如果盘点库位为默认库位 - - Location.append(" - 默认库位"); - - } else { - Location.append(" - ").append(place.getCode()); - } for (StockTakingChildP childP : minRecordList) { // 获取子订单信息 @@ -528,23 +517,12 @@ public class QyWxOperationService { StringBuilder stockTakingResult = new StringBuilder(); // 物料盘盈数量 StringBuilder stockTakingInventory = new StringBuilder(); - // 获取盘点的库位 - Integer placeId = mainRecord.getPlaceId(); - Place place = placeMapper.findPlaceById(placeId); // 获取盘点的仓库 Integer depositoryId = mainRecord.getDepositoryId(); Depository depository = depositoryMapper.findDepositoryById(depositoryId); Location.append(depository.getDname()); - if (Integer.compare(0, placeId) == 0) { - // 如果盘点库位为默认库位 - - Location.append(" - 默认库位"); - - } else { - Location.append(" - ").append(place.getCode()); - } for (StockTakingChildP childP : minRecordList) { // 获取子订单信息 @@ -866,9 +844,8 @@ public class QyWxOperationService { content.append("%n---%n"); - for (int i = 0; i < minIds.size(); i++) { + for (Long minId : minIds) { - Long minId = minIds.get(i); // 获取对应子订单 StockTakingChildP minRecord = stockTakingMapper.selectStockTakingChildPById(minId); @@ -886,7 +863,7 @@ public class QyWxOperationService { } // 获取转移前的库位 - Integer oldPlaceId = ObjectFormatUtil.toInteger(mainRecord.getPlaceId()); + Integer oldPlaceId = ObjectFormatUtil.toInteger(minRecord.getPid()); Place oldPlace = placeMapper.findPlaceById(oldPlaceId); @@ -976,9 +953,8 @@ public class QyWxOperationService { content.append("%n---%n"); - for (int i = 0; i < errIds.size(); i++) { + for (Long minId : errIds) { - Long minId = errIds.get(i); // 获取错误的子订单 StockTakingChildP minRecord = stockTakingMapper.selectStockTakingChildPById(minId); @@ -987,7 +963,7 @@ public class QyWxOperationService { // 获取转移前的库位 - Integer oldPlaceId = ObjectFormatUtil.toInteger(mainRecord.getPlaceId()); + Integer oldPlaceId = ObjectFormatUtil.toInteger(minRecord.getPid()); Place oldPlace = placeMapper.findPlaceById(oldPlaceId); @@ -1075,8 +1051,7 @@ public class QyWxOperationService { content.append("%n---%n"); - for (int i = 0; i < minIds.size(); i++) { - Long minId = minIds.get(i); + for (Long minId : minIds) { // 获取对应子订单 StockTakingChildP minRecord = stockTakingMapper.selectStockTakingChildPById(minId); @@ -1087,7 +1062,7 @@ public class QyWxOperationService { // 获取转移数量 Integer inventory = ObjectFormatUtil.toInteger(map.get("invnetory" + minId)); // 获取转移前的库位 - Integer oldPlaceId = ObjectFormatUtil.toInteger(mainRecord.getPlaceId()); + Integer oldPlaceId = ObjectFormatUtil.toInteger(minRecord.getPid()); Place oldPlace = placeMapper.findPlaceById(oldPlaceId); @@ -1796,10 +1771,10 @@ public class QyWxOperationService { /** * 用于发送入库审批 * - * @param userAgent 加密后的userAgent - * @param userToken 审批人 + * @param userAgent 加密后的userAgent + * @param userToken 审批人 * @param recordIdList 入库id列表 - * @param QyWxUid 接收人 + * @param QyWxUid 接收人 * @return */ public JSONObject sendApprovalTemplateIn(String userAgent, UserByPort userToken, List recordIdList, String QyWxUid) { @@ -1807,7 +1782,7 @@ public class QyWxOperationService { // 获取当前出库明细 List minRecordList = depositoryRecordMapper.findApplicationInRecordsByIds(recordIdList); - if(minRecordList.size() <= 0){ + if (minRecordList.size() <= 0) { throw new MyException("参数错误"); } // 定义审批模板 @@ -1838,7 +1813,7 @@ public class QyWxOperationService { List userIdList = new ArrayList<>(); String[] split = QyWxUid.split(","); for (String value : split) { - if("".equals(value)){ + if ("".equals(value)) { continue; } userIdList.add(value); @@ -2140,14 +2115,10 @@ public class QyWxOperationService { // 获取当前盘点位置 Depository depository = depositoryMapper.findDepositoryById(mainRecord.getDepositoryId()); - Place place = placeMapper.findPlaceById(mainRecord.getPlaceId()); // 声明盘点位置 - String location = ""; - if (Integer.compare(place.getId(), 0) == 0) { - location = depository.getDname(); - } else { - location = depository.getDname() + "-" + place.getCode(); - } + + String location = depository.getDname(); + // 声明盘点审批模板 ApprovalTemplate approvalTemplate = new ApprovalTemplate(); diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/StockTakingServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/StockTakingServiceImpl.java index 3f1f3de2..19db5776 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/StockTakingServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/StockTakingServiceImpl.java @@ -162,10 +162,10 @@ public class StockTakingServiceImpl implements StockTakingService { page = ObjectFormatUtil.toInteger(map.get("page")); map.put("begin", (page - 1) * size); } + List myTask = stockTakingMapper.findMyTask(map); List stockTakingPS = new ArrayList<>(); - for (int i = 0; i < myTask.size(); i++) { - StockTaking stockTaking = myTask.get(i); + for (StockTaking stockTaking : myTask) { SimpleStockTakingP ssp = new SimpleStockTakingP(stockTaking); Depository depositoryRecordById = depositoryMapper.findDepositoryById(stockTaking.getDepositoryId()); ssp.setDepositoryName(depositoryRecordById.getDname()); @@ -358,9 +358,7 @@ public class StockTakingServiceImpl implements StockTakingService { // 定义出错信息 List err = new ArrayList<>(); - Integer placeId = mainRecord.getPlaceId(); - // 获取库位详情 - Place placeById = placeMapper.findPlaceById(placeId); + Integer depositoryId = mainRecord.getDepositoryId(); // 获取所有子单 @@ -369,6 +367,10 @@ public class StockTakingServiceImpl implements StockTakingService { // 获取子单详情 // 获取盘点的物料详情 + Integer placeId = minRecord.getPid(); + // 获取库位详情 + Place placeById = placeMapper.findPlaceById(placeId); + // 获取当前盘点结果 String takingResult = minRecord.getTakingResult(); if ("Inventory_normal".equals(takingResult)) { @@ -388,6 +390,8 @@ public class StockTakingServiceImpl implements StockTakingService { // 获取物料与库位的对应关系 MaterialAndPlace placeAndMaterialByMidAndPid = placeMapper.findPlaceAndMaterialByMidAndPid(paramForMaterialAndPlace); + + // 根据盘点结果重新计算物料的单价 @@ -403,7 +407,8 @@ public class StockTakingServiceImpl implements StockTakingService { int newNumberForPlace = 0; // 用于计算新的库位与物料对应关系的数量 int newNumberForMatrialAndPlace = 0; - if ("Inventory_up".equals(takingResult)) { + if ("Inventory_up".equals(takingResult)) + { // 如果盘盈 // 更新当前库位数量 @@ -427,7 +432,8 @@ public class StockTakingServiceImpl implements StockTakingService { // 更新物料与库位对应关系的数量 placeAndMaterialByMidAndPid.setQuantity(newNumberForMatrialAndPlace); - } else { + } + else { // 如果盘亏 newNumberForPlace = placeById.getQuantity() - inventory; @@ -450,7 +456,6 @@ public class StockTakingServiceImpl implements StockTakingService { placeAndMaterialByMidAndPid.setQuantity(newNumberForMatrialAndPlace); } - normalMinId.add(minRecord.getId()); } @@ -500,7 +505,7 @@ public class StockTakingServiceImpl implements StockTakingService { map.put("departmentManager", userToken.getNumber()); stockTakingMapper.updateStockTaking(map); - // 更新其他卡片 + /*// 更新其他卡片 String finalStockTakingResult = stockTakingResult; new Thread(new Runnable() { @Override @@ -513,7 +518,7 @@ public class StockTakingServiceImpl implements StockTakingService { String responseCode = (String) redisTemplate.opsForHash().get(key, "responseCode"); qyWxOperationService.updateTemplateCard(responseCode, userToken.getName(), finalStockTakingResult, userAgent); } - }).start(); + }).start();*/ // 开启流程通知其他人忽略审批流程 new Thread(new Runnable() { @@ -522,9 +527,8 @@ public class StockTakingServiceImpl implements StockTakingService { String departmentManager1 = mainRecord.getDepartmentManager(); String[] split = departmentManager1.split(","); StringBuilder QyWxUid = new StringBuilder(); - for (int i = 0; i < split.length; i++) { - String s = split[i]; - if("".equals(s.trim())){ + for (String s : split) { + if ("".equals(s.trim())) { continue; } UserByPort userByPort = PortConfig.findUserByPortByNumber(s); @@ -586,16 +590,15 @@ public class StockTakingServiceImpl implements StockTakingService { // 定义出错信息 List err = new ArrayList<>(); - Integer placeId = mainRecord.getPlaceId(); - // 获取库位详情 - Place placeById = placeMapper.findPlaceById(placeId); - Integer depositoryId = mainRecord.getDepositoryId(); - // 获取所有子单 List minRecordList = stockTakingMapper.selectStockTakingChildByMainId(mainId); + // 遍历当前拆单的子单详情 for (StockTakingChildP minRecord : minRecordList) { // 获取子单详情 + Integer placeId = minRecord.getPid(); + // 获取库位详情 + Place placeById = placeMapper.findPlaceById(placeId); // 获取当前盘点结果 String takingResult = minRecord.getTakingResult(); @@ -613,7 +616,7 @@ public class StockTakingServiceImpl implements StockTakingService { // 获取盘点物料信息 Inventory inventoryById = materialMapper.findInventoryById(minRecord.getMid()); - + // 定义用于获取物料与库位的对应关系的参数 Map paramForMaterialAndPlace = new HashMap<>(); paramForMaterialAndPlace.put("mid", inventoryById.getId()); paramForMaterialAndPlace.put("pid", placeById.getId()); @@ -637,8 +640,8 @@ public class StockTakingServiceImpl implements StockTakingService { mapForProducedDate.put("producedDate", producedDate); // 获取当前生产日期下的物料与生产日期的对应关系 MaterialAndProducedDate materialAndProducedDate = materialMapper.findMaterialAndProducedDateByMidAndProducedDate(mapForProducedDate); - Integer oldInventroy = materialAndProducedDate.getInventory(); - if (newInventory > oldInventroy) { + Integer oldInventory = materialAndProducedDate.getInventory(); + if (newInventory > oldInventory) { // 如果当前盘点数量大于库存数量 // 修改当前库存 @@ -647,7 +650,7 @@ public class StockTakingServiceImpl implements StockTakingService { materialAndProducedDate.setExpendnum(materialAndProducedDate.getQuantity() - newInventory); // 修改物料对应数量 - inventoryById.setQuantity(inventoryById.getQuantity() + newInventory - oldInventroy); + inventoryById.setQuantity(inventoryById.getQuantity() + newInventory - oldInventory); } else { @@ -659,14 +662,12 @@ public class StockTakingServiceImpl implements StockTakingService { materialAndProducedDate.setExpendnum(materialAndProducedDate.getQuantity() - newInventory); // 修改物料对应数量 - inventoryById.setQuantity(inventoryById.getQuantity() - oldInventroy + newInventory); + inventoryById.setQuantity(inventoryById.getQuantity() - oldInventory + newInventory); } - // 获取当前物料数目 - Integer quantity = inventoryById.getQuantity(); - materialMapper.updateMaterialAndProducedDate(materialAndProducedDate); - } else { + } + else { // 如果没有生产日期 // 获取当前库位以外的物料数量 @@ -680,21 +681,20 @@ public class StockTakingServiceImpl implements StockTakingService { } // 用于计算新的库位数量 - Integer newNumberForPlace = 0; + int newNumberForPlace = 0; // 用于计算新的库位与物料对应关系的数量 - Integer newNumberForMatrialAndPlace = 0; + int newNumberForMatrialAndPlace = 0; if ("Inventory_up".equals(takingResult)) { // 如果盘盈 // 如果是基础单位 - if ("-1".equals(unit)) { + if ("-1".equals(unit) || inventoryById.getUnit().equals(minRecord.getUnit())) { // 更新当前库位数量 newNumberForPlace = placeById.getQuantity() + inventory; if (newNumberForPlace <= placeById.getMax()) { - // 如果更新后的库位数量没有上溢 // 更新当前库位的数量 @@ -714,16 +714,8 @@ public class StockTakingServiceImpl implements StockTakingService { } else { // 如果是拆单单位 - // 更新当前库位数量 - newNumberForPlace = placeById.getQuantity() + inventory; - if (newNumberForPlace > placeById.getMax()) { - // 添加错误信息 - errIds.add(minRecord.getId()); - err.add("当前库位数量溢出,需要转移"); - continue; - } // 用于查找对应的拆单记录 Map paramForSplitInfo = new HashMap<>(); paramForSplitInfo.put("newUnit", unit); @@ -733,8 +725,9 @@ public class StockTakingServiceImpl implements StockTakingService { // 查找当前拆单记录对应的库存记录 SplitInventory splitInventory = splitUnitService.findSplitInventoryByIidAndSid(placeAndMaterialByMidAndPid.getId(), splitInfo.getId()); - + // 如果存在拆单库存记录 if(splitInventory != null){ + // 获取当前盘点后的库存数 int realQuantity = Math.round(inventory) + splitInventory.getSaveQuantity(); // 定义当前进制 int scale = splitInfo.getQuantity(); @@ -775,8 +768,21 @@ public class StockTakingServiceImpl implements StockTakingService { // 修改拆单库存 splitUnitMapper.updateSplitInventory(splitInventory); } - }else{ - int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); + } + else{ + // 如果不存在拆单库存记录 + + Map paramForUpdateSplitInventory = new HashMap<>(); + paramForUpdateSplitInventory.put("placeId",minRecord.getPid()); + paramForUpdateSplitInventory.put("depositoryId",mainRecord.getDepositoryId()); + paramForUpdateSplitInventory.put("quantity",inventory); + paramForUpdateSplitInventory.put("mid",inventoryById.getMid()); + paramForUpdateSplitInventory.put("unit",minRecord.getUnit()); + + splitUnitService.realInInventoryToDepository(Double.valueOf(inventory), null,paramForUpdateSplitInventory,splitInfo,placeAndMaterialByMidAndPid,false); + if (paramForUpdateSplitInventory.containsKey("applicationInId")) { + depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(paramForUpdateSplitInventory.get("applicationInId"))); + } } @@ -785,7 +791,7 @@ public class StockTakingServiceImpl implements StockTakingService { else { // 如果盘亏 - if ("-1".equals(unit)) { + if ("-1".equals(unit) || inventoryById.getUnit().equals(minRecord.getUnit())) { // 如果盘点的是基础单位 newNumberForPlace = placeById.getQuantity() - inventory; @@ -875,13 +881,12 @@ public class StockTakingServiceImpl implements StockTakingService { map.put("minIds", minIds); // 开启一个线程用于发送抄送信息给负责人 - StockTaking finalMainRecord = mainRecord; new Thread(new Runnable() { @Override public void run() { String s = QyWxUid.toString(); s = "PangFuZhen,"; - JSONObject jsonObject = qyWxOperationService.sendCcStockTakingMessageToHead(s, map, userToken, finalMainRecord, userAgent); + JSONObject jsonObject = qyWxOperationService.sendCcStockTakingMessageToHead(s, map, userToken, mainRecord, userAgent); } }).start(); @@ -945,10 +950,7 @@ public class StockTakingServiceImpl implements StockTakingService { List errIds = new ArrayList<>(); // 定义出错信息 List err = new ArrayList<>(); - // 获取盘点的库位id - Integer placeId = mainRecord.getPlaceId(); - // 获取库位详情 - Place placeById = placeMapper.findPlaceById(placeId); + // 获取盘点的仓库id Integer depositoryId = mainRecord.getDepositoryId(); // 获取仓库详情 @@ -961,6 +963,10 @@ public class StockTakingServiceImpl implements StockTakingService { // 获取当前盘点的计量单位 String unit = minRecord.getUnit(); + // 获取盘点的库位id + Integer placeId = minRecord.getPid(); + // 获取库位详情 + Place placeById = placeMapper.findPlaceById(placeId); // 获取当前盘点结果 String takingResult = minRecord.getTakingResult(); @@ -1444,15 +1450,17 @@ public class StockTakingServiceImpl implements StockTakingService { // 定义出错信息 List err = new ArrayList<>(); - Integer placeId = mainRecord.getPlaceId(); - // 获取库位详情 - Place placeById = placeMapper.findPlaceById(placeId); + Integer depositoryId = mainRecord.getDepositoryId(); // 获取所有子单 List minRecordList = stockTakingMapper.selectStockTakingChildByMainId(ObjectFormatUtil.toInteger(mainId)); for (StockTakingChildP minRecord : minRecordList) { // 获取子单详情 + Integer placeId = minRecord.getPid(); + // 获取库位详情 + Place placeById = placeMapper.findPlaceById(placeId); + // 获取盘点的物料详情 @@ -1646,7 +1654,7 @@ public class StockTakingServiceImpl implements StockTakingService { // 如果转移前的库位为空 if (oldPlace == null) { // 查询当前主订单对应的盘点库位 - oldPlace = placeMapper.findPlaceById(mainRecord.getPlaceId()); + oldPlace = placeMapper.findPlaceById(minRecord.getPid()); // 设置当前转移前库位的总数 sumTransferAfter = oldPlace.getQuantity(); } @@ -2519,12 +2527,7 @@ public class StockTakingServiceImpl implements StockTakingService { // 定义出错信息 List err = new ArrayList<>(); - Integer placeId = mainRecord.getPlaceId(); - // 获取库位详情 - Place placeById = placeMapper.findPlaceById(placeId); - Integer depositoryId = mainRecord.getDepositoryId(); - // 获取仓库详情 - Depository depositoryById = depositoryMapper.findDepositoryById(depositoryId); + // 获取所有子单 @@ -2532,7 +2535,10 @@ public class StockTakingServiceImpl implements StockTakingService { for (int i = 0; i < minRecordList.size(); i++) { // 获取子单详情 StockTakingChildP minRecord = minRecordList.get(i); - // 获取盘点的物料详情 + + Integer placeId = minRecord.getPid(); + // 获取库位详情 + Place placeById = placeMapper.findPlaceById(placeId); // 获取当前盘点结果 String takingResult = minRecord.getTakingResult(); diff --git a/src/main/resources/templates/pages/stockTaking/stockTaking.html b/src/main/resources/templates/pages/stockTaking/stockTaking.html index a5a972d2..106c5e6d 100644 --- a/src/main/resources/templates/pages/stockTaking/stockTaking.html +++ b/src/main/resources/templates/pages/stockTaking/stockTaking.html @@ -317,6 +317,7 @@ {field: 'mname', width: 150, title: '物料名称'}, {field: 'typeName', width: 100, title: '物料种类'}, {field: 'version', width: 150, title: '规格型号',}, + {field: 'pcode', width: 150, title: '所处库位',}, {title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, {field: 'inventory', width: 100, title: '库存数'}, {field: 'stockTakingQuantity', width: 100, title: '盘点数', edit: 'quantity'}, @@ -333,8 +334,8 @@ let takingUnit = j["takingUnit"]; if (takingUnit !== null) { let parentItem = $("[lay-id='currentTableId'] tr:eq(" + (i + 1) + ")"); - let unitHandleItem = parentItem.children()[4]; - let quantityHandleItem = parentItem.children()[5]; + let unitHandleItem = parentItem.children()[5]; + let quantityHandleItem = parentItem.children()[6]; unitHandleItem.childNodes[0].childNodes[1].childNodes[0].data = takingUnit; quantityHandleItem.childNodes[0].innerText = j["splitInventory"][takingUnit]; } @@ -499,7 +500,7 @@ , data: dropDownDataList , click: function (unit) { this.elem[0].childNodes[0].data = unit.title; - obj.tr[0].childNodes[5].childNodes[0].innerText = obj.data.splitInventory[unit.title]; + obj.tr[0].childNodes[6].childNodes[0].innerText = obj.data.splitInventory[unit.title]; } , align: 'right' //右对齐弹出(v2.6.8 新增) , style: 'box-shadow: 1px 1px 10px rgb(0 0 0 / 12%);' //设置额外样式 @@ -512,7 +513,7 @@ // 用于计算盘点结果 calculate = function (obj) { - let oldInventory = Number(obj.tr[0].childNodes[5].childNodes[0].innerText); + let oldInventory = Number(obj.tr[0].childNodes[6].childNodes[0].innerText); let nowInventory = Number(obj.value); let number = 0; let takingResult = ''; @@ -530,15 +531,15 @@ takingResult = "Inventory_normal"; takingResultString = "正常"; } - obj.tr[0].childNodes[7].childNodes[0].innerText = takingResultString; - obj.tr[0].childNodes[8].childNodes[0].innerText = number; + obj.tr[0].childNodes[8].childNodes[0].innerText = takingResultString; + obj.tr[0].childNodes[9].childNodes[0].innerText = number; obj.update({takingResult: takingResult}); obj.update({takingInventory: number}); req.number = number + ""; req.takingResult = takingResult; req.takingResultString = takingResultString; req.id = obj.data.id + ""; - req.unit = obj.tr[0].childNodes[4].childNodes[0].innerText; + req.unit = obj.tr[0].childNodes[5].childNodes[0].innerText; req.oldInventory = oldInventory+""; $.ajax({ url: "/stockTaking/temporaryStorageForTakingResult", @@ -548,42 +549,6 @@ contentType: "application/json;charset=utf-8" }); }; - - - form.on('select()', function (data) { - var id = data.elem.id; //得到select原始DOM对象id - var req = {}; - if (id.includes("producedDate")) { - var idNumber = id.split('producedDate')[1]; // 得到当前id对应数字 - req.mid = $("#" + "mid" + idNumber).val(); - req.producedDate = data.value; - $.ajax({ - url: "/material/findQuantityByProducedDate", - type: "post", - dataType: 'json', - data: JSON.stringify(req), - contentType: "application/json;charset=utf-8", - success: function (d) { - $("#" + "oldInventory" + idNumber).val(d.data) - } - }); - } else if (id.includes("unit")) { - let idNumber = id.split("unit")[1]; // 得到当前id对应数字 - req.mid = $("#" + "mid" + idNumber).val(); - req.unit = data.value; - req.placeId = $("#placeId").val(); - $.ajax({ - url: "/material/findQuantityByUnit", - type: "post", - dataType: 'json', - data: JSON.stringify(req), - contentType: "application/json;charset=utf-8", - success: function (d) { - $("#" + "oldInventory" + idNumber).val(d.data) - } - }); - } - }); }); diff --git a/src/main/resources/templates/pages/stockTaking/stockTakingComplete.html b/src/main/resources/templates/pages/stockTaking/stockTakingComplete.html index 43761dda..3fd3f94b 100644 --- a/src/main/resources/templates/pages/stockTaking/stockTakingComplete.html +++ b/src/main/resources/templates/pages/stockTaking/stockTakingComplete.html @@ -45,7 +45,7 @@
@@ -219,21 +219,22 @@
-
-
-
-
- -
-
-
-
+
+
+
+
+
+ +
+
+
+
diff --git a/target/classes/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml b/target/classes/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml index cd130a4d..9f64557e 100644 --- a/target/classes/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml +++ b/target/classes/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml @@ -9,10 +9,9 @@ - - + @@ -36,6 +35,7 @@ + @@ -44,21 +44,20 @@ - st.id,st.code,st.depositoryId,st.placeId,st.departmentManager,st.state,st.createTime,st.originator,st.completeTime,st.reviewTime,st.auditOpinion,st.departmentManagerState + st.id,st.code,st.depositoryId,st.departmentManager,st.state,st.createTime,st.originator,st.completeTime,st.reviewTime,st.auditOpinion,st.departmentManagerState - id,mid,oldInventory,newInventory,inventory,mainId,takingResult,mname,mtId,tname,mcode,mversion,munit,mtexture,producedDate,stcUnit + id,mid,oldInventory,newInventory,inventory,mainId,takingResult,mname,mtId,tname,mcode,mversion,munit,mtexture,producedDate,stcUnit,pid - INSERT INTO stocktaking (id,code,depositoryId,placeId,departmentManager,state,createTime,originator,departmentManagerState) + INSERT INTO stocktaking (id,code,depositoryId,departmentManager,state,createTime,originator,departmentManagerState) values ( #{id}, #{code}, #{depositoryId}, - #{placeId}, #{departmentManager}, #{state}, #{createTime}, @@ -69,9 +68,9 @@ - INSERT INTO stocktakingchild (id,mid,oldInventory,newInventory,takingResult,inventory,mainId,producedDate,unit) + INSERT INTO stocktakingchild (id,mid,oldInventory,newInventory,takingResult,inventory,mainId,producedDate,unit,pid) values ( - #{id},#{mid},#{oldInventory},#{newInventory},#{takingResult},#{inventory},#{mainId},#{producedDate},#{unit} + #{id},#{mid},#{oldInventory},#{newInventory},#{takingResult},#{inventory},#{mainId},#{producedDate},#{unit},#{placeId} ) @@ -109,9 +108,6 @@ depositoryId = #{depositoryId}, - - placeId = #{placeId}, - departmentManager = #{departmentManager}, @@ -166,9 +162,13 @@ producedDate = #{producedDate}, + + pid = #{placeId}, + unit = #{unit} + where id = #{id} @@ -202,9 +202,7 @@ and st.depositoryId = #{depositoryId} - - and st.placeId = #{placeId} - + and st.departmentManagerState = #{departmentManagerState} @@ -232,6 +230,9 @@ and newInventory = #{newInventory} + + and pid = #{placeId} + and takingResult = #{takingResult} @@ -287,10 +288,10 @@ from stocktaking st where 1 = 1 - and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) + and (state = 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) - and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) + and (state != 3 and FIND_IN_SET(#{departmentHead},st.departmentManager) != 0 ) ORDER BY st.createTime desc diff --git a/target/classes/templates/pages/stockTaking/stockTaking.html b/target/classes/templates/pages/stockTaking/stockTaking.html index a5a972d2..106c5e6d 100644 --- a/target/classes/templates/pages/stockTaking/stockTaking.html +++ b/target/classes/templates/pages/stockTaking/stockTaking.html @@ -317,6 +317,7 @@ {field: 'mname', width: 150, title: '物料名称'}, {field: 'typeName', width: 100, title: '物料种类'}, {field: 'version', width: 150, title: '规格型号',}, + {field: 'pcode', width: 150, title: '所处库位',}, {title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, {field: 'inventory', width: 100, title: '库存数'}, {field: 'stockTakingQuantity', width: 100, title: '盘点数', edit: 'quantity'}, @@ -333,8 +334,8 @@ let takingUnit = j["takingUnit"]; if (takingUnit !== null) { let parentItem = $("[lay-id='currentTableId'] tr:eq(" + (i + 1) + ")"); - let unitHandleItem = parentItem.children()[4]; - let quantityHandleItem = parentItem.children()[5]; + let unitHandleItem = parentItem.children()[5]; + let quantityHandleItem = parentItem.children()[6]; unitHandleItem.childNodes[0].childNodes[1].childNodes[0].data = takingUnit; quantityHandleItem.childNodes[0].innerText = j["splitInventory"][takingUnit]; } @@ -499,7 +500,7 @@ , data: dropDownDataList , click: function (unit) { this.elem[0].childNodes[0].data = unit.title; - obj.tr[0].childNodes[5].childNodes[0].innerText = obj.data.splitInventory[unit.title]; + obj.tr[0].childNodes[6].childNodes[0].innerText = obj.data.splitInventory[unit.title]; } , align: 'right' //右对齐弹出(v2.6.8 新增) , style: 'box-shadow: 1px 1px 10px rgb(0 0 0 / 12%);' //设置额外样式 @@ -512,7 +513,7 @@ // 用于计算盘点结果 calculate = function (obj) { - let oldInventory = Number(obj.tr[0].childNodes[5].childNodes[0].innerText); + let oldInventory = Number(obj.tr[0].childNodes[6].childNodes[0].innerText); let nowInventory = Number(obj.value); let number = 0; let takingResult = ''; @@ -530,15 +531,15 @@ takingResult = "Inventory_normal"; takingResultString = "正常"; } - obj.tr[0].childNodes[7].childNodes[0].innerText = takingResultString; - obj.tr[0].childNodes[8].childNodes[0].innerText = number; + obj.tr[0].childNodes[8].childNodes[0].innerText = takingResultString; + obj.tr[0].childNodes[9].childNodes[0].innerText = number; obj.update({takingResult: takingResult}); obj.update({takingInventory: number}); req.number = number + ""; req.takingResult = takingResult; req.takingResultString = takingResultString; req.id = obj.data.id + ""; - req.unit = obj.tr[0].childNodes[4].childNodes[0].innerText; + req.unit = obj.tr[0].childNodes[5].childNodes[0].innerText; req.oldInventory = oldInventory+""; $.ajax({ url: "/stockTaking/temporaryStorageForTakingResult", @@ -548,42 +549,6 @@ contentType: "application/json;charset=utf-8" }); }; - - - form.on('select()', function (data) { - var id = data.elem.id; //得到select原始DOM对象id - var req = {}; - if (id.includes("producedDate")) { - var idNumber = id.split('producedDate')[1]; // 得到当前id对应数字 - req.mid = $("#" + "mid" + idNumber).val(); - req.producedDate = data.value; - $.ajax({ - url: "/material/findQuantityByProducedDate", - type: "post", - dataType: 'json', - data: JSON.stringify(req), - contentType: "application/json;charset=utf-8", - success: function (d) { - $("#" + "oldInventory" + idNumber).val(d.data) - } - }); - } else if (id.includes("unit")) { - let idNumber = id.split("unit")[1]; // 得到当前id对应数字 - req.mid = $("#" + "mid" + idNumber).val(); - req.unit = data.value; - req.placeId = $("#placeId").val(); - $.ajax({ - url: "/material/findQuantityByUnit", - type: "post", - dataType: 'json', - data: JSON.stringify(req), - contentType: "application/json;charset=utf-8", - success: function (d) { - $("#" + "oldInventory" + idNumber).val(d.data) - } - }); - } - }); }); diff --git a/target/classes/templates/pages/stockTaking/stockTakingComplete.html b/target/classes/templates/pages/stockTaking/stockTakingComplete.html index 43761dda..3fd3f94b 100644 --- a/target/classes/templates/pages/stockTaking/stockTakingComplete.html +++ b/target/classes/templates/pages/stockTaking/stockTakingComplete.html @@ -45,7 +45,7 @@
@@ -219,21 +219,22 @@
-
-
-
-
- -
-
-
-
+
+
+
+
+
+ +
+
+
+