Commit 341bc092 authored by zhangsen's avatar zhangsen

保存API 返回列表数据

parent a7714823
...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto; ...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice; import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -59,7 +60,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot ...@@ -59,7 +60,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param model 数据 * @param model 数据
* @param submitType 保存类型 * @param submitType 保存类型
*/ */
void saveNotice(String submitType, JSONObject model, ReginParams reginParams); List<JgInstallationNotice> saveNotice(String submitType, JSONObject model, ReginParams reginParams);
/** /**
* 打印告知单 * 打印告知单
......
...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto; ...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice; import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice;
import jdk.nashorn.api.scripting.JSObject; import jdk.nashorn.api.scripting.JSObject;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -26,7 +27,7 @@ public interface IJgTransferNoticeService extends IService<JgTransferNotice> { ...@@ -26,7 +27,7 @@ public interface IJgTransferNoticeService extends IService<JgTransferNotice> {
Boolean deleteForBatch(Long[] sequenceNbrs); Boolean deleteForBatch(Long[] sequenceNbrs);
void saveNotice(String submitType, Map<String, Object> model, ReginParams reginParams); List<JgTransferNotice> saveNotice(String submitType, Map<String, Object> model, ReginParams reginParams);
String generateTransferNoticeReport(Long sequenceNbr); String generateTransferNoticeReport(Long sequenceNbr);
......
...@@ -545,7 +545,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -545,7 +545,7 @@ public class CommonServiceImpl implements ICommonService {
JSONObject jsonObject1 = (JSONObject) JSONObject.toJSON(jgInstallationNoticeDto); JSONObject jsonObject1 = (JSONObject) JSONObject.toJSON(jgInstallationNoticeDto);
provideMap.put(AZGZ_FORM_ID, jsonObject1); provideMap.put(AZGZ_FORM_ID, jsonObject1);
JSONObject jsonObject = new JSONObject(provideMap); JSONObject jsonObject = new JSONObject(provideMap);
iJgInstallationNoticeService.saveNotice(submitType, jsonObject, reginParams); return iJgInstallationNoticeService.saveNotice(submitType, jsonObject, reginParams);
} else if (type.equals(ApplicationFormTypeEnum.GZGZ.getBusinessCode())) { } else if (type.equals(ApplicationFormTypeEnum.GZGZ.getBusinessCode())) {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
...@@ -563,7 +563,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -563,7 +563,7 @@ public class CommonServiceImpl implements ICommonService {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
provideMap.put(YZGZ_PAGE_ID, noticeObj); provideMap.put(YZGZ_PAGE_ID, noticeObj);
JSONObject jsonObject = new JSONObject(provideMap); JSONObject jsonObject = new JSONObject(provideMap);
jgTransferNoticeService.saveNotice(submitType, jsonObject, reginParams); return jgTransferNoticeService.saveNotice(submitType, jsonObject, reginParams);
} else if (type.equals(ApplicationFormTypeEnum.SYDJ.getBusinessCode())) { } else if (type.equals(ApplicationFormTypeEnum.SYDJ.getBusinessCode())) {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
......
...@@ -471,7 +471,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -471,7 +471,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override @Override
@SuppressWarnings({"Duplicates", "rawtypes"}) @SuppressWarnings({"Duplicates", "rawtypes"})
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void saveNotice(String submitType, JSONObject jgInstallationNoticeDtoMap, ReginParams reginParams) { public List<JgInstallationNotice> saveNotice(String submitType, JSONObject jgInstallationNoticeDtoMap, ReginParams reginParams) {
JgInstallationNoticeDto model = JSON.parseObject(jgInstallationNoticeDtoMap.get(TABLE_PAGE_ID).toString(), JgInstallationNoticeDto.class); JgInstallationNoticeDto model = JSON.parseObject(jgInstallationNoticeDtoMap.get(TABLE_PAGE_ID).toString(), JgInstallationNoticeDto.class);
// 字段转换 // 字段转换
...@@ -517,6 +517,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -517,6 +517,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return jgRelationEquip.setEquipTransferId(String.valueOf(sequenceNbr)); return jgRelationEquip.setEquipTransferId(String.valueOf(sequenceNbr));
}).collect(Collectors.toList()); }).collect(Collectors.toList());
jgInstallationNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList); jgInstallationNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList);
return list;
} }
/** /**
......
...@@ -383,19 +383,19 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -383,19 +383,19 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Override @Override
@SuppressWarnings({"Duplicates", "rawtypes"}) @SuppressWarnings({"Duplicates", "rawtypes"})
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void saveNotice(String submitType, Map<String, Object> jgTransferNoticeDtoMap, ReginParams reginParams) { public List<JgTransferNotice> saveNotice(String submitType, Map<String, Object> jgTransferNoticeDtoMap, ReginParams reginParams) {
JgTransferNoticeDto model = JSON.parseObject(JSONObject.toJSONString(jgTransferNoticeDtoMap.get(TABLE_PAGE_ID)), JgTransferNoticeDto.class); JgTransferNoticeDto model = JSON.parseObject(JSONObject.toJSONString(jgTransferNoticeDtoMap.get(TABLE_PAGE_ID)), JgTransferNoticeDto.class);
// 字段转换 // 字段转换
convertField(model); convertField(model);
// 获取告知设备列表 // 获取告知设备列表
List<Map<String, Object>> deviceList = model.getDeviceList(); List<Map<String, Object>> deviceList = model.getDeviceList();
if (CollectionUtils.isEmpty(deviceList)) { if (CollectionUtils.isEmpty(deviceList)) {
return; return new ArrayList<>();
} }
// 获取告知单号 // 获取告知单号
ResponseModel<List<String>> responseModel = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.YZGZ.getCode(), deviceList.size()); ResponseModel<List<String>> responseModel = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.YZGZ.getCode(), deviceList.size());
if (CollectionUtils.isEmpty(responseModel.getResult())) { if (CollectionUtils.isEmpty(responseModel.getResult())) {
return; return new ArrayList<>();
} }
// 启动工作流并返回信息 // 启动工作流并返回信息
List<WorkflowResultDto> workflowResultList = workFlowInfo(submitType, deviceList, model.getReceiveOrgCode()); List<WorkflowResultDto> workflowResultList = workFlowInfo(submitType, deviceList, model.getReceiveOrgCode());
...@@ -418,6 +418,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -418,6 +418,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}).collect(Collectors.toList()); }).collect(Collectors.toList());
jgTransferNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList); jgTransferNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList);
return list;
} }
/** /**
......
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