Commit 685b2962 authored by chenzhao's avatar chenzhao

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

parents 01baaae8 9657da34
......@@ -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 javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
......@@ -59,7 +60,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param model 数据
* @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;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice;
import jdk.nashorn.api.scripting.JSObject;
import java.util.List;
import java.util.Map;
/**
......@@ -26,7 +27,7 @@ public interface IJgTransferNoticeService extends IService<JgTransferNotice> {
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);
......
......@@ -42,8 +42,7 @@ public class JgScrapCancelController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增/新增并提交", notes = "新增/新增并提交")
public ResponseModel<Object> save(@RequestParam String submitType, @RequestBody Map<String, Object> model) {
jgScrapCancelService.save(submitType, model);
return ResponseHelper.buildResponse("ok");
return ResponseHelper.buildResponse(jgScrapCancelService.save(submitType, model));
}
/**
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege;
......@@ -18,10 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author system_generator
......@@ -40,8 +38,8 @@ public class JgUseRegistrationController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<Object> save(@RequestBody JSONObject map) {
jgUseRegistrationServiceImpl.save(map);
return ResponseHelper.buildResponse("ok");
JgUseRegistration data = jgUseRegistrationServiceImpl.save(map);
return ResponseHelper.buildResponse(Collections.singletonList(data));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -471,7 +471,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override
@SuppressWarnings({"Duplicates", "rawtypes"})
@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);
// 字段转换
......@@ -517,6 +517,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return jgRelationEquip.setEquipTransferId(String.valueOf(sequenceNbr));
}).collect(Collectors.toList());
jgInstallationNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList);
return list;
}
/**
......
......@@ -142,9 +142,14 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
return JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
}
@Transactional(rollbackFor = Exception.class)
public List<JgScrapCancel> saveList(String submitType, Map<String, Object> mapParams) {
return Collections.singletonList(this.save(submitType, mapParams));
}
@SuppressWarnings({"Duplicates", "rawtypes"})
@Transactional(rollbackFor = Exception.class)
public void save(String submitType, Map<String, Object> mapParams) {
public JgScrapCancel save(String submitType, Map<String, Object> mapParams) {
ReginParams reginParams = this.getSelectedOrgInfo();
Map<?, ?> noticeParams = (Map) mapParams.get(PAGE_KEY);
String equipId = String.valueOf(noticeParams.get("record"));
......@@ -175,7 +180,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
List<String> roleListAll = new ArrayList<>();
List<String> applyNoList = listResponseModel.getResult();
if (CollectionUtils.isEmpty(applyNoList)) {
return;
return null;
}
// 判断当前是否为提交
List<WorkflowResultDto> workflowResultDtos = null;
......@@ -238,6 +243,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
this.createTaskModel(jgScrapCancel, taskName[0], submitType, nextUserIds);
jgRelationEquip.setEquipTransferId(String.valueOf(jgScrapCancel.getSequenceNbr()));
jgScrapCancelEqService.save(jgRelationEquip);
return jgScrapCancel;
}
private void createTaskModel(JgScrapCancel scrapCancel, String taskName, String submitType, String nextUserIds) {
......
......@@ -266,7 +266,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
List<ActWorkflowStartDTO> list = new ArrayList<>();
ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
dto.setProcessDefinitionKey(PROCESS_DEFINITION_KEY);
dto.setBusinessKey(noticeDto.getSequenceNbr().toString());
dto.setBusinessKey(String.valueOf(noticeDto.getSequenceNbr()));
dto.setCompleteFirstTask(Boolean.TRUE);
//下一节点执行人单位(下节点接收机构code)
dto.setNextExecuteUserCompanyCode(notice.getReceiveOrgCode());
......@@ -383,19 +383,19 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Override
@SuppressWarnings({"Duplicates", "rawtypes"})
@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);
// 字段转换
convertField(model);
// 获取告知设备列表
List<Map<String, Object>> deviceList = model.getDeviceList();
if (CollectionUtils.isEmpty(deviceList)) {
return;
return new ArrayList<>();
}
// 获取告知单号
ResponseModel<List<String>> responseModel = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.YZGZ.getCode(), deviceList.size());
if (CollectionUtils.isEmpty(responseModel.getResult())) {
return;
return new ArrayList<>();
}
// 启动工作流并返回信息
List<WorkflowResultDto> workflowResultList = workFlowInfo(submitType, deviceList, model.getReceiveOrgCode());
......@@ -418,10 +418,12 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}).collect(Collectors.toList());
jgTransferNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList);
return list;
}
/**
* 暂存任务生成待办
*
* @param list 业务信息
*/
private void buildTaskDraft(List<JgTransferNotice> list) {
......@@ -465,8 +467,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
dto.setPromoter(reginParams.getUserModel().getUserId());
dto.setNextTaskId(workflowResultList.get(i).getNextTaskId());
}
dto.setEquList(obj.get("EQU_LIST").toString());
dto.setSupervisoryCode(obj.get("SUPERVISORY_CODE").toString());
dto.setEquList(String.valueOf(obj.get("EQU_LIST")));
dto.setSupervisoryCode(String.valueOf(obj.get("SUPERVISORY_CODE")));
dto.setInstallUnitName(reginParams.getCompany().getCompanyName());
dto.setInstallUnitCreditCode(reginParams.getCompany().getCompanyCode());
jgRelationEquip.setEquId(String.valueOf(obj.get("SEQUENCE_NBR")));
......@@ -516,7 +518,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
taskModelDtoList.add(taskModelDto);
if (isDeleteDraft) {
// 删除暂存时生成的待办
commonService.deleteTaskModel(item.getSequenceNbr()+"");
commonService.deleteTaskModel(item.getSequenceNbr() + "");
}
});
commonService.buildTaskModel(taskModelDtoList);
......@@ -536,7 +538,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
deviceList.forEach(item -> {
ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
dto.setProcessDefinitionKey(PROCESS_DEFINITION_KEY);
dto.setBusinessKey(item.get("SEQUENCE_NBR").toString());
dto.setBusinessKey(String.valueOf(item.get("SEQUENCE_NBR")));
dto.setCompleteFirstTask(Boolean.TRUE);
//下一节点执行人单位(下节点接收机构code)
dto.setNextExecuteUserCompanyCode(receiveOrgCode);
......
......@@ -154,7 +154,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
@Transactional
public void save(JSONObject map) {
public JgUseRegistration save(JSONObject map) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 使用登记信息
JgUseRegistration jgUseRegistration = new JgUseRegistration();
......@@ -260,6 +260,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
list.add(dto);
commonServiceImpl.buildTaskModel(list);
}
return jgUseRegistration;
}
public JgUseRegistration updateData(Long sequenceNbr, String operate, WorkflowResultDto workflowResultDto, Boolean isFirst) {
......
......@@ -57,7 +57,7 @@ public enum BizTypeEnum {
public static String getNameByNum(String num) {
for (BizTypeEnum c : BizTypeEnum.values()) {
if (c.getCode().equals(num)){
if (c.getNum().equals(num)){
return c.getName();
}
}
......
......@@ -121,4 +121,7 @@ public class JyjcOpeningApplicationModel extends BaseModel {
@ApiModelProperty ("下个任务执行人ids")
private String nextExecuteUserIds;
@ApiModelProperty ("是否监管")
private String identityType;
}
......@@ -5,27 +5,13 @@
<select id="queryForDataList"
resultType="com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel">
SELECT
tzjia.sequence_nbr,
tzjia.process_instance_id,
tzjia.workflow_node,
tzjia.biz_type,
tzjia.application_no,
tzjia.*
cdd1.NAME AS inspectionClassify,
cdd3.NAME AS inspectionType,
tzjia.inspection_unit_code,
cdd.NAME AS equipClassify,
tzjia.number_of_equip,
tzjia.inspection_unit_code,
tzjia.application_date,
tzjia.accept_date,
tzjia.inspection_charge_phone,
tbei.use_unit AS applicationUnitName,
tbei1.use_unit AS inspectionUnitName,
tzjia.status,
cdd2.NAME AS statusName,
tzjia.next_execute_ids as nextExecuteIds,
tzjia.promoter,
tzjia.create_user_id,
(select group_concat(name) from tzs_user_info where find_in_set(sequence_nbr,tzjia.inspection_charge_person)) as inspectionChargePerson FROM
tz_jyjc_inspection_application AS tzjia
LEFT JOIN tz_base_enterprise_info tbei ON tbei.use_code = tzjia.application_unit_code
......@@ -82,29 +68,13 @@
<select id="selectForPage" resultType="com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel">
SELECT
DISTINCT(tzjia.sequence_nbr),
tzjia.process_instance_id,
tzjia.workflow_node,
tzjia.biz_type,
tzjia.application_no,
tzjia.*
cdd1.NAME AS inspectionClassify,
cdd3.NAME AS inspectionType,
tzjia.inspection_unit_code,
cdd.NAME AS equipClassify,
tzjia.number_of_equip,
tzjia.inspection_unit_code,
tzjia.application_date,
tzjia.accept_date,
tzjia.inspection_charge_phone,
tbei.use_unit AS applicationUnitName,
tbei1.use_unit AS inspectionUnitName,
tzjia.status,
cdd2.NAME AS statusName,
tzjia.next_execute_ids as nextExecuteIds,
tzjia.promoter,
tzjia.create_user_id,
tzjia.next_execute_user_ids as nextExecuteUserIds,
tzjia.inspection_charge_person as inspectionChargePerson
cdd2.NAME AS statusName
FROM
tz_jyjc_inspection_application AS tzjia
LEFT JOIN tz_base_enterprise_info tbei ON tbei.use_code = tzjia.application_unit_code
......
......@@ -112,6 +112,9 @@
<if test="jyjcInspectionResultModel.inspectionUnitCode != '' and jyjcInspectionResultModel.inspectionUnitCode != null">
and res.inspection_unit_code = #{jyjcInspectionResultModel.inspectionUnitCode}
</if>
<if test="jyjcInspectionResultModel.applicationUnitName != '' and jyjcInspectionResultModel.applicationUnitName != null">
and bei1.use_unit like concat('%',#{jyjcInspectionResultModel.applicationUnitName},'%')
</if>
<choose>
<when test="identity == 'apply'">
and res.application_unit_code = #{jyjcInspectionResultModel.companyCode}
......
......@@ -6,28 +6,7 @@
<select id="selectJyjcOpeningApplicationList"
resultType="com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel">
select
a.unit_code,
a.detection_region,
a.detection_region_name,
a.application_seq,
a.result_type,
a.expiry_date,
a.accept_date,
a.status,
a.remark,
a.sequence_nbr,
a.rec_date,
a.rec_user_id,
a.rec_user_name,
a.apply_time,
a.workflow_prostance_id,
a.workflow_role,
a.unit_code_name,
cdd2.NAME as status_name,
a.workflow_active_key,
a.next_execute_ids,
a.promoter,
a.create_user_id
a.*,cdd2.NAME as status_name
from tz_jyjc_opening_application a
LEFT JOIN cb_data_dictionary cdd2 ON cdd2.code = a.status and cdd2.type = 'JYLCSQ'
<where>
......
......@@ -80,9 +80,13 @@ public class JyjcOpeningApplicationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/submit")
@ApiOperation(httpMethod = "PUT", value = "保存并提交", notes = "保存并提交")
public ResponseModel<JyjcOpeningApplicationModel> updateBySequenceNbrAndStartFlow(@RequestBody JSONObject jsonObject, @RequestParam(value = "sequenceNbr", required = false) Long sequenceNbr) {
public ResponseModel<List<JyjcOpeningApplicationModel>> updateBySequenceNbrAndStartFlow(@RequestBody JSONObject jsonObject, @RequestParam(value = "sequenceNbr", required = false) Long sequenceNbr) {
JyjcOpeningApplicationModel model = new JyjcOpeningApplicationModel();
BeanUtil.copyProperties(jsonObject.get("applyInfo"),model);
if (jsonObject.containsKey("applyInfo")) {
BeanUtil.copyProperties(jsonObject.get("applyInfo"), model);
} else {
BeanUtil.copyProperties(jsonObject, model);
}
model.setSequenceNbr(sequenceNbr);
if (sequenceNbr != null) {
JyjcOpeningApplicationModel jyjcOpeningApplicationModel = jyjcOpeningApplicationServiceImpl.queryDetail(sequenceNbr);
......@@ -90,7 +94,8 @@ public class JyjcOpeningApplicationController extends BaseController {
throw new BadRequest("企业资质信息和检验人员信息为空,无法提交!");
}
}
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.saveOrUpdateModel(model,true));
JyjcOpeningApplicationModel data = jyjcOpeningApplicationServiceImpl.saveOrUpdateModel(model, true);
return ResponseHelper.buildResponse(Collections.singletonList(data));
}
@Deprecated
......
......@@ -42,7 +42,7 @@
}, {
"type":"114",
"pageType": "look",
"url": "/mixuap?appId=1742358052905971713&id=1735201757841092609&roleIds={roleIds}&userId={userId}&pageType=edit"
"url": "/mixuap?appId=1742358052905971713&id=1735201757841092609&roleIds={roleIds}&userId={userId}&pageType=look"
}, {
"type":"114",
"pageType": "edit",
......
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