Commit 30c51a8a authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 5dbc3051 95c5a2fb
...@@ -89,10 +89,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -89,10 +89,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
JgFeignClient jgFeignClient; JgFeignClient jgFeignClient;
public JyjcInspectionApplicationModel save(@RequestBody JyjcInspectionApplicationModel model) { public JyjcInspectionApplicationModel save(@RequestBody JSONObject obj) {
//开启报检流程工作流 //开启报检流程工作流
JyjcInspectionApplicationModel model = JSONObject.parseObject(JSON.toJSONString(obj), JyjcInspectionApplicationModel.class);
if (CharSequenceUtil.isNotEmpty(model.getProcessInstanceId()) && model.getOperationType().equals("0")){ if (CharSequenceUtil.isNotEmpty(model.getProcessInstanceId()) && model.getOperationType().equals("0")){
model.setOperationType("2"); model.setOperationType("2");
} }
...@@ -152,15 +153,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -152,15 +153,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
} }
} }
Map<String, Object> map = BeanUtil.beanToMap(model); // Map<String, Object> map = BeanUtil.beanToMap(model);
// 附件保存 // 附件保存
List<String> enumNameList = DocumentEnum.getEnumNameList(); List<String> enumNameList = DocumentEnum.getEnumNameList();
List<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>(); List<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>();
for (String code : enumNameList) { for (String code : enumNameList) {
if (map.containsKey(code)) { if (obj.containsKey(code)) {
JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment(); JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment();
attachments.setAttachmentType(code); attachments.setAttachmentType(code);
attachments.setAttachmentUrl(JSONObject.toJSONString(map.get(code))); attachments.setAttachmentUrl(JSONObject.toJSONString(obj.get(code)));
attachments.setApplicationSeq(model.getSequenceNbr()); attachments.setApplicationSeq(model.getSequenceNbr());
jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments); jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments);
} }
...@@ -190,17 +191,17 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -190,17 +191,17 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
} }
} }
Map<String, Object> map = BeanUtil.beanToMap(model); // Map<String, Object> map = BeanUtil.beanToMap(model);
// 附件更新 // 附件更新
List<String> enumNameList = DocumentEnum.getEnumNameList(); List<String> enumNameList = DocumentEnum.getEnumNameList();
List<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>(); List<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>();
jyjcInspectionApplicationAttachmentService.getBaseMapper().deleteByApplicationSeq(model.getSequenceNbr()); jyjcInspectionApplicationAttachmentService.getBaseMapper().deleteByApplicationSeq(model.getSequenceNbr());
for (String code : enumNameList) { for (String code : enumNameList) {
if (map.containsKey(code)) { if (obj.containsKey(code)) {
JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment(); JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment();
attachments.setAttachmentType(code); attachments.setAttachmentType(code);
attachments.setAttachmentUrl(JSONObject.toJSONString(map.get(code))); attachments.setAttachmentUrl(JSONObject.toJSONString(obj.get(code)));
attachments.setApplicationSeq(model.getSequenceNbr()); attachments.setApplicationSeq(model.getSequenceNbr());
jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments); jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment