更新代码

main
liuliang 3 weeks ago
parent cfea58d150
commit effe884851

@ -33,7 +33,7 @@ public class CommonServiceImpl implements CommonService {
for (Map.Entry<String,Object> e : condition.entrySet()){ for (Map.Entry<String,Object> e : condition.entrySet()){
updateSql = updateSql + " and "+ e.getKey()+"='"+e.getValue()+"'"; updateSql = updateSql + " and "+ e.getKey()+"='"+e.getValue()+"'";
} }
log.info("makeUpdateSql : [{}]",updateSql); log.error("makeUpdateSql : [{}]",updateSql);
return databaseUtils.execute(updateSql); return databaseUtils.execute(updateSql);
} }
@ -57,8 +57,8 @@ public class CommonServiceImpl implements CommonService {
key = key.substring(0,key.length()-1) + ")"; key = key.substring(0,key.length()-1) + ")";
value = value.substring(0,value.length()-1)+")"; value = value.substring(0,value.length()-1)+")";
insertSql = insertSql + key +" values "+value; insertSql = insertSql + key +" values "+value;
log.debug("makeInsertSql : [{}]",insertSql); log.error("makeInsertSql : [{}]",insertSql);
log.debug("needInsertDate: [{}]",dataList); log.error("needInsertDate: [{}]",dataList);
return databaseUtils.execute(insertSql,dataList); return databaseUtils.execute(insertSql,dataList);
} }
} }

@ -67,12 +67,11 @@ public class EmployeeInformationController {
*/ */
@WeaPermission(publicPermission = true) @WeaPermission(publicPermission = true)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@PostMapping("/getPendingEmployment") @PostMapping("/updatePendingEmploy")
public Map<String, Object> updatePendingEmploy(@RequestBody PendingEmployee employee){ public Map<String, Object> updatePendingEmploy(@RequestBody PendingEmployee employee){
log.error("getInformation Employee[{}]",employee); log.error("getInformation Employee[{}]",employee);
Map<String, Object> actionMap = new HashMap<>(); Map<String, Object> actionMap = new HashMap<>();
//List<Map<String, Object>> resultList = employeeInformationService.getPendingEmployment(employee); employeeInformationService.updatePendingEmploy(employee);
// actionMap.put("resultList",resultList);
return actionMap; return actionMap;
} }

@ -18,4 +18,6 @@ public class PendingEmployee {
private String id; private String id;
private String glyg; private String glyg;
private String rzzt;
} }

@ -56,7 +56,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
String ygzt = CommonUtils.null2String(userMap.get("personnel_status")); String ygzt = CommonUtils.null2String(userMap.get("personnel_status"));
if (ygzt.equals("5")){ if (ygzt.equals("5")){
//离职 //离职
sql = "select zhgzr,lzqbm from uf_jcl_lzxxjl where glyg=? and (delete_type is null or delete_type=false) "; sql = "select zhgzr,lzqbm from uf_jcl_lzxxjl where glyg=? and (delete_type is null or delete_type<>'1') ";
List<Map<String, Object>> resignList = databaseUtils.getSqlList(sql, CommonUtils.getParamList(userMap.get("id").toString())); List<Map<String, Object>> resignList = databaseUtils.getSqlList(sql, CommonUtils.getParamList(userMap.get("id").toString()));
if (resignList.size() > 0){ if (resignList.size() > 0){
userMap.put("zhgzr",resignList.get(0).get("zhgzr")); userMap.put("zhgzr",resignList.get(0).get("zhgzr"));
@ -64,7 +64,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
ssbm = CommonUtils.null2String(resignList.get(0).get("lzqbm")); ssbm = CommonUtils.null2String(resignList.get(0).get("lzqbm"));
}else if (ygzt.equals("6")){ }else if (ygzt.equals("6")){
//退休 //退休
sql = "select zhgzr,txqbm from uf_jcl_txxxjl where glyg=? and (delete_type is null or delete_type=false) "; sql = "select zhgzr,txqbm from uf_jcl_txxxjl where glyg=? and (delete_type is null or delete_type<>'1') ";
List<Map<String, Object>> retireList = databaseUtils.getSqlList(sql, CommonUtils.getParamList(userMap.get("id").toString())); List<Map<String, Object>> retireList = databaseUtils.getSqlList(sql, CommonUtils.getParamList(userMap.get("id").toString()));
if (retireList.size() > 0){ if (retireList.size() > 0){
userMap.put("zhgzr",retireList.get(0).get("zhgzr")); userMap.put("zhgzr",retireList.get(0).get("zhgzr"));
@ -85,7 +85,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
@Override @Override
public List<Map<String, Object>> getPendingEmployment(Employee employee) { public List<Map<String, Object>> getPendingEmployment(Employee employee) {
String sql = "select * from uf_jcl_rzgl where (delete_type is null or delete_type=false) and ("; String sql = "select * from uf_jcl_rzgl where (delete_type is null or delete_type<>'1') and (";
List<String> paramList = Lists.newArrayList(); List<String> paramList = Lists.newArrayList();
if (employee.getMobile() != null && !"".equals(employee.getMobile())){ if (employee.getMobile() != null && !"".equals(employee.getMobile())){

Loading…
Cancel
Save