fanxw пре 1 година
родитељ
комит
8cf7feec2f

+ 5 - 4
src/main/java/com/chinaitop/depot/basic/controller/BasicKeeperController.java

@@ -175,10 +175,11 @@ public class BasicKeeperController {
175
 		@ApiImplicitParam(name = "zyjsJson", value = "员工职业技术等级数据对象", paramType = "form"),
175
 		@ApiImplicitParam(name = "zyjsJson", value = "员工职业技术等级数据对象", paramType = "form"),
176
 		@ApiImplicitParam(name = "zyzgJson", value = "员工专业资格数据对象", paramType = "form"),
176
 		@ApiImplicitParam(name = "zyzgJson", value = "员工专业资格数据对象", paramType = "form"),
177
 		@ApiImplicitParam(name = "sgzJson", value = "员工上岗证数据对象", paramType = "form"),
177
 		@ApiImplicitParam(name = "sgzJson", value = "员工上岗证数据对象", paramType = "form"),
178
-		@ApiImplicitParam(name = "userInfo", value = "登录信息数据对象", paramType = "form")
178
+		@ApiImplicitParam(name = "userInfo", value = "登录信息数据对象", paramType = "form"),
179
+		@ApiImplicitParam(name = "jllgJson", value = "交流轮岗数据对象", paramType = "form"),
179
 	})
180
 	})
180
 	public Map<String, Object> edit(String keeper, String xwxlJson, 
181
 	public Map<String, Object> edit(String keeper, String xwxlJson, 
181
-			String zyjsJson, String zyzgJson, String sgzJson, String userInfo) throws Exception {
182
+			String zyjsJson, String zyzgJson, String sgzJson, String userInfo, String jllgJson) throws Exception {
182
 		Map<String, Object> modelMap = new HashMap<String, Object>();
183
 		Map<String, Object> modelMap = new HashMap<String, Object>();
183
 		ObjectMapper mappers = new ObjectMapper();
184
 		ObjectMapper mappers = new ObjectMapper();
184
 		BasicKeeper basicKeeper = mappers.readValue(keeper, BasicKeeper.class);
185
 		BasicKeeper basicKeeper = mappers.readValue(keeper, BasicKeeper.class);
@@ -192,11 +193,11 @@ public class BasicKeeperController {
192
 			List<BasicKeeper> kList = keeperService.findCondition(keeperExample);
193
 			List<BasicKeeper> kList = keeperService.findCondition(keeperExample);
193
 			if (null != kList && kList.size() > 0) {
194
 			if (null != kList && kList.size() > 0) {
194
 				modelMap.put("status", "success");
195
 				modelMap.put("status", "success");
195
-				modelMap.put("msg", "当前职员在当前岗位的信息已经存在,请不要重复添加!");
196
+				modelMap.put("msg", "当前员工在当前角色的信息已经存在,请不要重复添加!");
196
 				return modelMap;
197
 				return modelMap;
197
 			}
198
 			}
198
 		}
199
 		}
199
-		keeperService.editKeeper(userInfo, keeper, xwxlJson, zyjsJson, zyzgJson, sgzJson);
200
+		keeperService.editKeeper(userInfo, keeper, xwxlJson, zyjsJson, zyzgJson, sgzJson, jllgJson);
200
 		modelMap.put("status", "success");
201
 		modelMap.put("status", "success");
201
 		modelMap.put("msg", "保存成功!");
202
 		modelMap.put("msg", "保存成功!");
202
 		return modelMap;
203
 		return modelMap;

+ 16 - 0
src/main/java/com/chinaitop/depot/basic/model/BasicKeeper.java

@@ -704,4 +704,20 @@ public class BasicKeeper {
704
 		this.cjgzsj = cjgzsj;
704
 		this.cjgzsj = cjgzsj;
705
 	}
705
 	}
706
 
706
 
707
+	/**
708
+	 * 领导班子成员/关键部门负责人
709
+	 * @return
710
+	 */
711
+	public String getCyfzr() {
712
+		return cyfzr;
713
+	}
714
+
715
+	/**
716
+	 * 领导班子成员/关键部门负责人
717
+	 * @param cyfzr
718
+	 */
719
+	public void setCyfzr(String cyfzr) {
720
+		this.cyfzr = cyfzr;
721
+	}
722
+
707
 }
723
 }

+ 2 - 1
src/main/java/com/chinaitop/depot/basic/service/BasicKeeperService.java

@@ -71,9 +71,10 @@ public interface BasicKeeperService {
71
 	 * @param zyjsJson
71
 	 * @param zyjsJson
72
 	 * @param zyzgJson
72
 	 * @param zyzgJson
73
 	 * @param sgzJson
73
 	 * @param sgzJson
74
+	 * @param jllgJson
74
 	 * @throws Exception 
75
 	 * @throws Exception 
75
 	 */
76
 	 */
76
-	public void editKeeper(String userInfo, String keeper, String xwxlJson, String zyjsJson, String zyzgJson, String sgzJson) throws Exception;
77
+	public void editKeeper(String userInfo, String keeper, String xwxlJson, String zyjsJson, String zyzgJson, String sgzJson, String jllgJson) throws Exception;
77
 
78
 
78
 	/**
79
 	/**
79
 	 * 根据移交人的id更新保管员的仓号
80
 	 * 根据移交人的id更新保管员的仓号

+ 34 - 22
src/main/java/com/chinaitop/depot/basic/service/impl/BasicKeeperServiceImpl.java

@@ -71,7 +71,7 @@ public class BasicKeeperServiceImpl implements BasicKeeperService {
71
 		List<BasicKeeperEducation> zyjsList = new ArrayList<BasicKeeperEducation>(); //专业技术职称2
71
 		List<BasicKeeperEducation> zyjsList = new ArrayList<BasicKeeperEducation>(); //专业技术职称2
72
 		List<BasicKeeperEducation> zyzgList = new ArrayList<BasicKeeperEducation>(); //职业资格及等级3
72
 		List<BasicKeeperEducation> zyzgList = new ArrayList<BasicKeeperEducation>(); //职业资格及等级3
73
 		List<BasicKeeperEducation> sgzList = new ArrayList<BasicKeeperEducation>(); //上岗证4
73
 		List<BasicKeeperEducation> sgzList = new ArrayList<BasicKeeperEducation>(); //上岗证4
74
-		List<BasicKeeperEducation> zswjList = new ArrayList<BasicKeeperEducation>(); //证书附件5
74
+		List<BasicKeeperEducation> jllgList = new ArrayList<BasicKeeperEducation>(); //交流轮岗5
75
 		BasicKeeperEducation ekeObje = null;
75
 		BasicKeeperEducation ekeObje = null;
76
 		
76
 		
77
 		if (id != null) {
77
 		if (id != null) {
@@ -133,6 +133,9 @@ public class BasicKeeperServiceImpl implements BasicKeeperService {
133
 					} else if (4 == bke.getDatatype()) {
133
 					} else if (4 == bke.getDatatype()) {
134
 						bke.setDatatype(4);
134
 						bke.setDatatype(4);
135
 						sgzList.add(bke);
135
 						sgzList.add(bke);
136
+					} else if (5 == bke.getDatatype()) {
137
+						bke.setDatatype(4);
138
+						jllgList.add(bke);
136
 					}
139
 					}
137
 				}
140
 				}
138
 			}
141
 			}
@@ -170,18 +173,18 @@ public class BasicKeeperServiceImpl implements BasicKeeperService {
170
 			ekeObje.setDatatype(4);
173
 			ekeObje.setDatatype(4);
171
 			sgzList.add(ekeObje);
174
 			sgzList.add(ekeObje);
172
 		}
175
 		}
173
-		if (null == zswjList || zswjList.size() == 0) {
176
+		if (null == jllgList || jllgList.size() == 0) {
174
 			ekeObje = new BasicKeeperEducation();
177
 			ekeObje = new BasicKeeperEducation();
175
 			ekeObje.setKeeperId(keeper.getId());
178
 			ekeObje.setKeeperId(keeper.getId());
176
 			ekeObje.setDatatype(5);
179
 			ekeObje.setDatatype(5);
177
-			zswjList.add(ekeObje);
180
+			jllgList.add(ekeObje);
178
 		}
181
 		}
179
 
182
 
180
 		map.put("xlxwList", xlxwList);
183
 		map.put("xlxwList", xlxwList);
181
 		map.put("zyjsList", zyjsList);
184
 		map.put("zyjsList", zyjsList);
182
 		map.put("zyzgList", zyzgList);
185
 		map.put("zyzgList", zyzgList);
183
 		map.put("sgzList", sgzList);
186
 		map.put("sgzList", sgzList);
184
-		map.put("zswjList", zswjList);
187
+		map.put("jllgList", jllgList);
185
 
188
 
186
 		return map;
189
 		return map;
187
 	}
190
 	}
@@ -270,7 +273,7 @@ public class BasicKeeperServiceImpl implements BasicKeeperService {
270
 	@Override
273
 	@Override
271
 	@Transactional(rollbackFor = Exception.class)
274
 	@Transactional(rollbackFor = Exception.class)
272
 	public void editKeeper(String userInfo, String keeper, 
275
 	public void editKeeper(String userInfo, String keeper, 
273
-			String xwxlJson, String zyjsJson, String zyzgJson, String sgzJson) throws Exception {
276
+			String xwxlJson, String zyjsJson, String zyzgJson, String sgzJson, String jllgJson) throws Exception {
274
 		Date date = new Date();
277
 		Date date = new Date();
275
 		JSONObject user = null;
278
 		JSONObject user = null;
276
 		Integer orgId = null;
279
 		Integer orgId = null;
@@ -314,16 +317,19 @@ public class BasicKeeperServiceImpl implements BasicKeeperService {
314
 		//更新子表数据
317
 		//更新子表数据
315
 		//学历学位信息1
318
 		//学历学位信息1
316
 		List<BasicKeeperEducation> xlxwList = mappers.readValue(xwxlJson, new TypeReference<List<BasicKeeperEducation>>(){});
319
 		List<BasicKeeperEducation> xlxwList = mappers.readValue(xwxlJson, new TypeReference<List<BasicKeeperEducation>>(){});
317
-		editEducation(xlxwList, id);
318
-		//专业技术职称2
320
+		editEducation(xlxwList, id, basicKeeper.getOrgId());
321
+		//技能等级2
319
 		List<BasicKeeperEducation> zyjsList = mappers.readValue(zyjsJson, new TypeReference<List<BasicKeeperEducation>>(){});
322
 		List<BasicKeeperEducation> zyjsList = mappers.readValue(zyjsJson, new TypeReference<List<BasicKeeperEducation>>(){});
320
-		editEducation(zyjsList, id);
321
-		//职业资格及等级3
323
+		editEducation(zyjsList, id, basicKeeper.getOrgId());
324
+		//职称和荣誉称号3
322
 		List<BasicKeeperEducation> zyzgList = mappers.readValue(zyzgJson, new TypeReference<List<BasicKeeperEducation>>(){});
325
 		List<BasicKeeperEducation> zyzgList = mappers.readValue(zyzgJson, new TypeReference<List<BasicKeeperEducation>>(){});
323
-		editEducation(zyzgList, id);
326
+		editEducation(zyzgList, id, basicKeeper.getOrgId());
324
 		//上岗证4
327
 		//上岗证4
325
 		List<BasicKeeperEducation> sgzList = mappers.readValue(sgzJson, new TypeReference<List<BasicKeeperEducation>>(){});
328
 		List<BasicKeeperEducation> sgzList = mappers.readValue(sgzJson, new TypeReference<List<BasicKeeperEducation>>(){});
326
-		editEducation(sgzList, id);
329
+		editEducation(sgzList, id, basicKeeper.getOrgId());
330
+		//交流轮岗5
331
+		List<BasicKeeperEducation> jllgList = mappers.readValue(jllgJson, new TypeReference<List<BasicKeeperEducation>>(){});
332
+		editEducation(jllgList, id, basicKeeper.getOrgId());
327
 
333
 
328
 	}
334
 	}
329
 
335
 
@@ -334,33 +340,39 @@ public class BasicKeeperServiceImpl implements BasicKeeperService {
334
 	 * @param id
340
 	 * @param id
335
 	 */
341
 	 */
336
 	@Transactional(rollbackFor = Exception.class)
342
 	@Transactional(rollbackFor = Exception.class)
337
-	public void editEducation(List<BasicKeeperEducation> edcationList, Integer id) {
343
+	public void editEducation(List<BasicKeeperEducation> edcationList, Integer id, Integer orgId) {
338
 		Integer dataType = 0; //数据类型
344
 		Integer dataType = 0; //数据类型
339
 		for (BasicKeeperEducation bke : edcationList) {
345
 		for (BasicKeeperEducation bke : edcationList) {
340
 			if (null == bke.getId() || "".equals(bke.getId())) {
346
 			if (null == bke.getId() || "".equals(bke.getId())) {
341
 				bke.setKeeperId(id);
347
 				bke.setKeeperId(id);
342
 				dataType = bke.getDatatype();
348
 				dataType = bke.getDatatype();
343
-				if ("1".equals(dataType) || dataType == 1) {
344
-					Integer type = bke.getType();
345
-					if (type == null) {
349
+				if ("1".equals(dataType) || dataType == 1) {//学历
350
+//					Integer education = bke.getEducation();
351
+//					if (education == null) {
352
+//						continue;
353
+//					}
354
+				} else if ("2".equals(dataType) || dataType == 2) {//技能等级
355
+					String departMent = bke.getDepartment();
356
+					if (departMent == null || "".equals(departMent)) {
346
 						continue;
357
 						continue;
347
 					}
358
 					}
348
-				} else if ("2".equals(dataType) || dataType == 2) {
359
+				} else if ("3".equals(dataType) || dataType == 3) {//职称和荣誉称号
349
 					String departMent = bke.getDepartment();
360
 					String departMent = bke.getDepartment();
350
 					if (departMent == null || "".equals(departMent)) {
361
 					if (departMent == null || "".equals(departMent)) {
351
 						continue;
362
 						continue;
352
 					}
363
 					}
353
-				} else if ("3".equals(dataType) || dataType == 3) {
354
-					Integer occupation = bke.getOccupation();
355
-					if (occupation == null) {
364
+				} if ("4".equals(dataType) || dataType == 3) {//上岗证
365
+					String departMent = bke.getDepartment();
366
+					if (departMent == null || "".equals(departMent)) {
356
 						continue;
367
 						continue;
357
 					}
368
 					}
358
-				} else if ("5".equals(dataType) || dataType == 5) {
359
-					String department = bke.getDepartment();
360
-					if (department == null) {
369
+				} else if ("5".equals(dataType) || dataType == 5) {//交流轮岗
370
+					String fzywlx = bke.getFzywlx();
371
+					if (fzywlx == null) {
361
 						continue;
372
 						continue;
362
 					}
373
 					}
363
 				}
374
 				}
375
+				bke.setOrgId(orgId);
364
 				eduMapper.insertSelective(bke);
376
 				eduMapper.insertSelective(bke);
365
 			} else {
377
 			} else {
366
 				eduMapper.updateByPrimaryKeySelective(bke);
378
 				eduMapper.updateByPrimaryKeySelective(bke);