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
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")){
model.setOperationType("2");
}
......@@ -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<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>();
for (String code : enumNameList) {
if (map.containsKey(code)) {
if (obj.containsKey(code)) {
JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment();
attachments.setAttachmentType(code);
attachments.setAttachmentUrl(JSONObject.toJSONString(map.get(code)));
attachments.setAttachmentUrl(JSONObject.toJSONString(obj.get(code)));
attachments.setApplicationSeq(model.getSequenceNbr());
jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments);
}
......@@ -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<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>();
jyjcInspectionApplicationAttachmentService.getBaseMapper().deleteByApplicationSeq(model.getSequenceNbr());
for (String code : enumNameList) {
if (map.containsKey(code)) {
if (obj.containsKey(code)) {
JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment();
attachments.setAttachmentType(code);
attachments.setAttachmentUrl(JSONObject.toJSONString(map.get(code)));
attachments.setAttachmentUrl(JSONObject.toJSONString(obj.get(code)));
attachments.setApplicationSeq(model.getSequenceNbr());
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