fanxw 2 weeks ago
parent
commit
a2c568dd86

+ 12 - 13
src/main/java/com/chinaitop/depot/basic/service/impl/BasicKeeperServiceImpl.java

@@ -317,19 +317,19 @@ public class BasicKeeperServiceImpl implements BasicKeeperService {
317 317
 		//更新子表数据
318 318
 		//学历学位信息1
319 319
 		List<BasicKeeperEducation> xlxwList = mappers.readValue(xwxlJson, new TypeReference<List<BasicKeeperEducation>>(){});
320
-		editEducation(xlxwList, id, basicKeeper.getOrgId());
320
+		editEducation(xlxwList, id, basicKeeper.getOrgId(), 1);
321 321
 		//技能等级2
322 322
 		List<BasicKeeperEducation> zyjsList = mappers.readValue(zyjsJson, new TypeReference<List<BasicKeeperEducation>>(){});
323
-		editEducation(zyjsList, id, basicKeeper.getOrgId());
323
+		editEducation(zyjsList, id, basicKeeper.getOrgId(), 2);
324 324
 		//职称和荣誉称号3
325 325
 		List<BasicKeeperEducation> zyzgList = mappers.readValue(zyzgJson, new TypeReference<List<BasicKeeperEducation>>(){});
326
-		editEducation(zyzgList, id, basicKeeper.getOrgId());
326
+		editEducation(zyzgList, id, basicKeeper.getOrgId(), 3);
327 327
 		//上岗证4
328 328
 		List<BasicKeeperEducation> sgzList = mappers.readValue(sgzJson, new TypeReference<List<BasicKeeperEducation>>(){});
329
-		editEducation(sgzList, id, basicKeeper.getOrgId());
329
+		editEducation(sgzList, id, basicKeeper.getOrgId(), 4);
330 330
 		//交流轮岗5
331 331
 		List<BasicKeeperEducation> jllgList = mappers.readValue(jllgJson, new TypeReference<List<BasicKeeperEducation>>(){});
332
-		editEducation(jllgList, id, basicKeeper.getOrgId());
332
+		editEducation(jllgList, id, basicKeeper.getOrgId(), 5);
333 333
 
334 334
 	}
335 335
 
@@ -340,33 +340,32 @@ public class BasicKeeperServiceImpl implements BasicKeeperService {
340 340
 	 * @param id
341 341
 	 */
342 342
 	@Transactional(rollbackFor = Exception.class)
343
-	public void editEducation(List<BasicKeeperEducation> edcationList, Integer id, Integer orgId) {
344
-		Integer dataType = 0; //数据类型
343
+	public void editEducation(List<BasicKeeperEducation> edcationList, Integer id, Integer orgId, Integer datatype) {
345 344
 		for (BasicKeeperEducation bke : edcationList) {
346 345
 			if (null == bke.getId() || "".equals(bke.getId())) {
347 346
 				bke.setKeeperId(id);
348
-				dataType = bke.getDatatype();
349
-				if ("1".equals(dataType) || dataType == 1) {//学历
347
+				bke.setDatatype(datatype);
348
+				if ("1".equals(datatype) || datatype == 1) {//学历
350 349
 //					Integer education = bke.getEducation();
351 350
 //					if (education == null) {
352 351
 //						continue;
353 352
 //					}
354
-				} else if ("2".equals(dataType) || dataType == 2) {//技能等级
353
+				} else if ("2".equals(datatype) || datatype == 2) {//技能等级
355 354
 					String departMent = bke.getDepartment();
356 355
 					if (departMent == null || "".equals(departMent)) {
357 356
 						continue;
358 357
 					}
359
-				} else if ("3".equals(dataType) || dataType == 3) {//职称和荣誉称号
358
+				} else if ("3".equals(datatype) || datatype == 3) {//职称和荣誉称号
360 359
 					String departMent = bke.getDepartment();
361 360
 					if (departMent == null || "".equals(departMent)) {
362 361
 						continue;
363 362
 					}
364
-				} if ("4".equals(dataType) || dataType == 3) {//上岗证
363
+				} if ("4".equals(datatype) || datatype == 3) {//上岗证
365 364
 					String departMent = bke.getDepartment();
366 365
 					if (departMent == null || "".equals(departMent)) {
367 366
 						continue;
368 367
 					}
369
-				} else if ("5".equals(dataType) || dataType == 5) {//交流轮岗
368
+				} else if ("5".equals(datatype) || datatype == 5) {//交流轮岗
370 369
 					String fzywlx = bke.getFzywlx();
371 370
 					if (fzywlx == null) {
372 371
 						continue;