diff --git a/陕建岗位申请规则校验(ecode服务)checkPositionNew/src/main/java/com/weaver/seconddev/sxjg/controller/EmployeeSelfServiceController.java b/陕建岗位申请规则校验(ecode服务)checkPositionNew/src/main/java/com/weaver/seconddev/sxjg/controller/EmployeeSelfServiceController.java index 03eea0c..9ff942b 100644 --- a/陕建岗位申请规则校验(ecode服务)checkPositionNew/src/main/java/com/weaver/seconddev/sxjg/controller/EmployeeSelfServiceController.java +++ b/陕建岗位申请规则校验(ecode服务)checkPositionNew/src/main/java/com/weaver/seconddev/sxjg/controller/EmployeeSelfServiceController.java @@ -8,7 +8,6 @@ import com.weaver.common.authority.annotation.WeaPermission; import com.weaver.seconddev.sxjg.util.NccApiUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; @@ -36,6 +35,7 @@ public class EmployeeSelfServiceController { JSONObject resJsonObject = JSONObject.parseObject(rs11); if("1000000000".equals(resJsonObject.getString("code"))) { JSONArray dataArrayOne = resJsonObject.getJSONArray("data"); + //先给query接口加字段isExamine,默认false,不审核 if(dataArrayOne!=null && dataArrayOne.size() > 0) { for(int i = 0; i0) { + for(int i = 0;i0) { + for(int i1 = 0;i1 < afterdata1.size();i1++) { + JSONObject jsonObjecti1 = afterdata1.getJSONObject(i1); + afterdata.add(jsonObjecti1); + } + } + } } if(afterdata != null && afterdata.size() > 0) { dataArrayOne = resJsonObject.getJSONArray("data"); @@ -84,8 +94,12 @@ public class EmployeeSelfServiceController { JSONObject afertObj = afterdata.getJSONObject(x); String columnValue = afertObj.getString("columnValue"); String columnKey = afertObj.getString("columnKey"); + String columnLabel = afertObj.getString("columnLabel"); if(columnKey!=null && columnKey.length()>0 && columnKey.equals(re5.getString("key"))) { - re5.put("isExamine",true); + //将待审核的内容覆盖的原值,前端展示 + re5.put("isExamine",true);//isExamine,true为待审核状态 + re5.put("label",columnLabel); + re5.put("value",columnValue); } } } @@ -130,6 +144,22 @@ public class EmployeeSelfServiceController { return resJsonObject; } + + @WeaPermission(publicPermission = true) + @PostMapping("/persondata/query1") + public JSONObject persondataQuery1( + @RequestBody String body + ) throws Exception { + JSONObject r3 = JSONObject.parseObject(body); + NccApiUtil nccApiUtil = new NccApiUtil(); + nccApiUtil.init(); + String token = nccApiUtil.getToken(); + String url = nccApiUtil.getBaseUrl()+"nccloud/api/hrtrn/openAPI/persondata/query"; + String rs11 = nccApiUtil.doJsonPost(url,token,r3.toJSONString()); + JSONObject resJsonObject = JSONObject.parseObject(rs11); + return resJsonObject; + } + /** * use:个人信息授权项查询接口 */ @@ -307,7 +337,10 @@ public class EmployeeSelfServiceController { String pk_annex_approve = obj2.getString("pk_annex_approve"); String file_name = obj2.getString("file_name"); String checkstatus = obj2.getString("checkstatus"); - String type = obj2.getString("type"); + String type = ""; + if(obj2.containsKey("type")) { + type = obj2.getString("type"); + } String file_state = obj2.getString("file_state"); //仅checkstatus==0待审核时,才展示 if("0".equals(checkstatus)) { @@ -317,13 +350,26 @@ public class EmployeeSelfServiceController { y2.put("path",""); y2.put("file_state",file_state); y2.put("isExamine",true); - if(dataObject.containsKey(type)) { + if("0".equals(file_state)) {//新增 + if(dataObject.containsKey(type)) { + JSONArray b1 = dataObject.getJSONArray(type); + b1.add(y2); + }else { + JSONArray b2 = new JSONArray(); + b2.add(y2); + dataObject.put(type,b2); + } + }else {//删除 JSONArray b1 = dataObject.getJSONArray(type); - b1.add(y2); - }else { - JSONArray b2 = new JSONArray(); - b2.add(y2); - dataObject.put(type,b2); + for(int u = 0;u> rs = jdbcTemplateresp.queryForList(sql); Map singlemap = null; if(CollectionUtil.isNotEmpty(rs)) { diff --git a/陕建岗位申请规则校验(ecode服务)checkPositionNew/src/main/java/com/weaver/seconddev/sxjg/controller/PayslipPageTestController.java b/陕建岗位申请规则校验(ecode服务)checkPositionNew/src/main/java/com/weaver/seconddev/sxjg/controller/PayslipPageTestController.java index 49d0574..c8318cf 100644 --- a/陕建岗位申请规则校验(ecode服务)checkPositionNew/src/main/java/com/weaver/seconddev/sxjg/controller/PayslipPageTestController.java +++ b/陕建岗位申请规则校验(ecode服务)checkPositionNew/src/main/java/com/weaver/seconddev/sxjg/controller/PayslipPageTestController.java @@ -84,8 +84,8 @@ // public void test1() throws Exception { // Map rs = new HashMap<>(); // JSONObject r3 = new JSONObject(); -// r3.put("pk_psndoc","0001A2100000006CWEBW"); -// r3.put("tableCode","hi_psndoc_linkman"); +// r3.put("pk_psndoc","0001A2100000007KUXWS"); +// r3.put("tableCode","bd_psndoc"); // NccApiUtil nccApiUtil = new NccApiUtil(); // nccApiUtil.init(); // String token = nccApiUtil.getToken(); @@ -122,9 +122,19 @@ // JSONObject dataObj21 = dataObj2.getJSONObject("data"); // //如果是基本信息查询 // if("bd_psndoc".equals(r3.getString("tableCode"))) { -// JSONArray afterdata = null; -// if(dataObj21 != null && dataObj21.containsKey("afterData") && dataObj21.get("afterData") != null) { -// afterdata = dataObj21.getJSONArray("afterData"); +// JSONArray afterdata = new JSONArray(); +// JSONArray changedataArray = dataObj21.getJSONArray("changedata"); +// if(changedataArray!=null && changedataArray.size()>0) { +// for(int i = 0;i0) { +// for(int i1 = 0;i1 < afterdata1.size();i1++) { +// JSONObject jsonObjecti1 = afterdata1.getJSONObject(i1); +// afterdata.add(jsonObjecti1); +// } +// } +// } // } // if(afterdata != null && afterdata.size() > 0) { // dataArrayOne = resJsonObject.getJSONArray("data");