Explorar el Código

fix: 编辑派工企业wm_relation保存id错误问题

lixuesong hace 1 año
padre
commit
4ad5c32cef

+ 2 - 2
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmDaAgentController.java

@@ -779,8 +779,8 @@ public class WmDaAgentController {
 
 		SysDept byId = sysDeptService.getById(SecurityUtils.getUser().getDeptId());
 
-		WmDaAgent anId = wmDaAgentService.selectByDeptId(byId.getDeptId());
-		WmDaDrugEnt drId = wmDaDrugEntService.selectByDeptId(byId.getDeptId());
+//		WmDaAgent anId = wmDaAgentService.selectByDeptId(byId.getDeptId());
+//		WmDaDrugEnt drId = wmDaDrugEntService.selectByDeptId(byId.getDeptId());
 		List wmDaDrugEnts = null;
 		if (byId.getLevel() == 2) {
 			wmDaDrugEnts = wmDaAgentService.selectWmDaDrugEntByDeptId(byId.getDeptId());

+ 2 - 2
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmDaAgentServiceImpl.java

@@ -550,10 +550,10 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
 
 		WmDaAgent wmDaAgent1 = wmDaAgentMapper.selectOne(Wrappers.query(query));
 		if (wmDaAgent1 != null) {
-			for (String upId : ids) {
+			for (String upId : deptIds) {
 				WmRelation wmRelation = new WmRelation();
 				wmRelation.setUpId(Integer.parseInt(upId));
-				wmRelation.setDownId(Integer.parseInt(wmDaAgent1.getId()));
+				wmRelation.setDownId(Integer.parseInt(wmDaAgent1.getDeptId()));
 				newList.add(wmRelation);
 				wmRelationMapper.deleteByPrimaryKey(Long.valueOf(wmRelation.getDownId()));
 			}