|
@@ -98,14 +98,14 @@ public class HeShuController {
|
|
|
supplierEntity.setF_UNW_yida("https://garktl.aliwork.com/APP_QM42OEGLMNNGBLIJELJI/processDetail?formUuid=FORM-9C0EC03227CC49738447A27B4563779F0WLW&procInsId="+params.getString("fid"));
|
|
supplierEntity.setF_UNW_yida("https://garktl.aliwork.com/APP_QM42OEGLMNNGBLIJELJI/processDetail?formUuid=FORM-9C0EC03227CC49738447A27B4563779F0WLW&procInsId="+params.getString("fid"));
|
|
|
String operator=UtilMap.getString(formData,"radioField_mma72l0t");// 操作类型 客商准入 客商更新
|
|
String operator=UtilMap.getString(formData,"radioField_mma72l0t");// 操作类型 客商准入 客商更新
|
|
|
if(operator.equals("客商更新")){
|
|
if(operator.equals("客商更新")){
|
|
|
- String fId=UtilMap.getString(formData,params.getString("textField_moi1ejl2"));
|
|
|
|
|
|
|
+ String fId=UtilMap.getString(formData,"textField_moi1ejl2");
|
|
|
if(!PublicUtil.isNull(fId)){
|
|
if(!PublicUtil.isNull(fId)){
|
|
|
// 反审核
|
|
// 反审核
|
|
|
unAudit("BD_Supplier",fId);
|
|
unAudit("BD_Supplier",fId);
|
|
|
supplierEntity.setFSupplierId(Integer.parseInt(fId));
|
|
supplierEntity.setFSupplierId(Integer.parseInt(fId));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return saveToAudit("BD_Supplier",supplierEntity,params.getString("fid"),params.getString("key"),"selectField_mogukmd9","textareaField_mogukmdb","textField_moi1ejl2");
|
|
|
|
|
|
|
+ return saveToAudit("BD_Supplier",supplierEntity,params.getString("fid"),params.getString("key"),"selectField_mogukmd9","textareaField_mogukmdb","textField_moi1ejl2",null);
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
return McR.error("201",e.getMessage());
|
|
return McR.error("201",e.getMessage());
|
|
|
}
|
|
}
|
|
@@ -130,13 +130,17 @@ public class HeShuController {
|
|
|
bkList.add(fBankInfo);
|
|
bkList.add(fBankInfo);
|
|
|
}
|
|
}
|
|
|
customerInfo.setFT_BD_CUSTBANK(bkList);
|
|
customerInfo.setFT_BD_CUSTBANK(bkList);
|
|
|
- List<Map> list2=UtilMap.getList(formData,"tableField_mogukmdh");
|
|
|
|
|
- List<CustomerInfo.CustContact> dzList=new ArrayList<>();
|
|
|
|
|
|
|
+ List<Map> list2=UtilMap.getList(formData,"tableField_mma72kx1");
|
|
|
|
|
+ List<ContactInfo> lxrList=new ArrayList<>();
|
|
|
for(Map map:list2){
|
|
for(Map map:list2){
|
|
|
- CustomerInfo.CustContact custContact = BeanUtil.toBean(map, CustomerInfo.CustContact.class);
|
|
|
|
|
- dzList.add(custContact);
|
|
|
|
|
|
|
+ ContactInfo contactInfo=new ContactInfo();
|
|
|
|
|
+ contactInfo.setFName(UtilMap.getString(map,"textField_mma72kx2"));
|
|
|
|
|
+ contactInfo.setFMobile(UtilMap.getString(map,"textField_mma72kx3"));
|
|
|
|
|
+ contactInfo.setFCompanyType("BD_Customer");
|
|
|
|
|
+ contactInfo.setFBizLocation(UtilMap.getString(map,"textField_mogukmdi"));
|
|
|
|
|
+ contactInfo.setFBizAddress(UtilMap.getString(map,"textField_mogukmdi"));
|
|
|
|
|
+ lxrList.add(contactInfo);
|
|
|
}
|
|
}
|
|
|
- customerInfo.setFT_BD_CUSTCONTACT(dzList);
|
|
|
|
|
customerInfo.setFSALDEPTID(new FNumber(UtilMap.getString(formData,"textField_mogukmdd")));// 业务部门
|
|
customerInfo.setFSALDEPTID(new FNumber(UtilMap.getString(formData,"textField_mogukmdd")));// 业务部门
|
|
|
String custTypeValue=UtilMap.getString(formData,"radioField_mma72kxi");
|
|
String custTypeValue=UtilMap.getString(formData,"radioField_mma72kxi");
|
|
|
String custType;
|
|
String custType;
|
|
@@ -157,24 +161,24 @@ public class HeShuController {
|
|
|
customerInfo.setFCUSTID(Integer.parseInt(fId));
|
|
customerInfo.setFCUSTID(Integer.parseInt(fId));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return saveToAudit("BD_Customer",customerInfo,params.getString("fid"),params.getString("key"),"selectField_mogukmd8","textareaField_mogukmda","textField_moi1ejl1");
|
|
|
|
|
|
|
+ return saveToAudit("BD_Customer",customerInfo,params.getString("fid"),params.getString("key"),"selectField_mogukmd8","textareaField_mogukmda","textField_moi1ejl1",lxrList);
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
return McR.error("201",e.getMessage());
|
|
return McR.error("201",e.getMessage());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- private McR saveToAudit(String formid, Object object,String fid,String codeKey,String statusKey,String msgKey,String idKey) throws Exception {
|
|
|
|
|
|
|
+ private McR saveToAudit(String formid, Object object,String fid,String codeKey,String statusKey,String msgKey,String idKey,List<ContactInfo> lxrList) throws Exception {
|
|
|
JSONObject resultObj = new JSONObject();
|
|
JSONObject resultObj = new JSONObject();
|
|
|
K3CloudApi client = new K3CloudApi(initIden());
|
|
K3CloudApi client = new K3CloudApi(initIden());
|
|
|
String result=client.save(formid,JSONObject.toJSONString(UtilMap.map("Model",object)));
|
|
String result=client.save(formid,JSONObject.toJSONString(UtilMap.map("Model",object)));
|
|
|
resultObj.put("save",result);
|
|
resultObj.put("save",result);
|
|
|
Gson gson = new Gson();
|
|
Gson gson = new Gson();
|
|
|
RepoRet sRet = gson.fromJson(result, RepoRet.class);
|
|
RepoRet sRet = gson.fromJson(result, RepoRet.class);
|
|
|
|
|
+ JSONObject reObj = JSONObject.parseObject(result,JSONObject.class);
|
|
|
if (sRet.isSuccessfully()) {
|
|
if (sRet.isSuccessfully()) {
|
|
|
if(!PublicUtil.isNull(codeKey)){
|
|
if(!PublicUtil.isNull(codeKey)){
|
|
|
// 回写信息
|
|
// 回写信息
|
|
|
- JSONObject reObj = JSONObject.parseObject(result,JSONObject.class);
|
|
|
|
|
Map updateMap=UtilMap.map(codeKey,reObj.getJSONObject("Result").getString("Number"));
|
|
Map updateMap=UtilMap.map(codeKey,reObj.getJSONObject("Result").getString("Number"));
|
|
|
updateMap.put(statusKey,"成功");
|
|
updateMap.put(statusKey,"成功");
|
|
|
updateMap.put(idKey,reObj.getJSONObject("Result").getString("Id"));// ID 内码
|
|
updateMap.put(idKey,reObj.getJSONObject("Result").getString("Id"));// ID 内码
|
|
@@ -182,6 +186,13 @@ public class HeShuController {
|
|
|
JSONObject.toJSONString(updateMap)
|
|
JSONObject.toJSONString(updateMap)
|
|
|
).build(), YDConf.FORM_OPERATION.update);
|
|
).build(), YDConf.FORM_OPERATION.update);
|
|
|
}
|
|
}
|
|
|
|
|
+ if(lxrList!=null){
|
|
|
|
|
+ for (ContactInfo contactInfo : lxrList) {
|
|
|
|
|
+ contactInfo.setFCompany(new FNumber(reObj.getJSONObject("Result").getString("Number")));
|
|
|
|
|
+ String data=new Gson().toJson(contactInfo);
|
|
|
|
|
+ String id=saveToAudit("BD_CommonContact",new Gson().fromJson(data,Object.class));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
JsonObject jsonData = new JsonObject();
|
|
JsonObject jsonData = new JsonObject();
|
|
|
jsonData.addProperty("Ids", sRet.getResult().getId());
|
|
jsonData.addProperty("Ids", sRet.getResult().getId());
|
|
|
String result2=client.submit(formid, jsonData.toString());
|
|
String result2=client.submit(formid, jsonData.toString());
|
|
@@ -216,7 +227,19 @@ public class HeShuController {
|
|
|
}
|
|
}
|
|
|
return McR.error("203",JSONObject.toJSONString(resultObj));
|
|
return McR.error("203",JSONObject.toJSONString(resultObj));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ private String saveToAudit(String formid, Object object) throws Exception {
|
|
|
|
|
+ K3CloudApi client = new K3CloudApi(initIden());
|
|
|
|
|
+ String result=client.save(formid,JSONObject.toJSONString(UtilMap.map("Model",object)));
|
|
|
|
|
+ System.out.println(result);
|
|
|
|
|
+ Gson gson = new Gson();
|
|
|
|
|
+ RepoRet sRet = gson.fromJson(result, RepoRet.class);
|
|
|
|
|
+ JSONObject reObj = JSONObject.parseObject(result,JSONObject.class);
|
|
|
|
|
+ if (sRet.isSuccessfully()) {
|
|
|
|
|
+ return reObj.getJSONObject("Result").getString("Id");
|
|
|
|
|
+ }else {
|
|
|
|
|
+ return "";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
private void unAudit(String formid,String fNumber) throws Exception {
|
|
private void unAudit(String formid,String fNumber) throws Exception {
|
|
|
K3CloudApi client = new K3CloudApi(initIden());
|
|
K3CloudApi client = new K3CloudApi(initIden());
|
|
|
Gson gson = new Gson();
|
|
Gson gson = new Gson();
|