Commit ecbebfbd authored by chenzhao's avatar chenzhao

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

parents 05f70cd1 d3d847fe
......@@ -25,6 +25,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Map<String, Object> getUseDetail(@Param("id")String id);
Map<String, Object> getDesDetail(@Param("id")String id);
Page<Map<String, Object>> getEquipListPage(@Param("page")Page<Map<String, Object>> page,@Param("factoryNum") String factoryNum,@Param("equList")String equList,@Param("equCategory")String equCategory);
void updatePromoter(@Param("id")Long id);
......
......@@ -147,5 +147,19 @@
</if>
</where>
</select>
<select id="getDesDetail" resultType="java.util.Map">
select DESIGN_UNIT_CREDIT_CODE as designUnitCreditCode,
DESIGN_UNIT_NAME as designUnitName,
DESIGN_LICENSE_NUM as designLicenseNum,
DESIGN_USE_DATE as designUseDate,
DESIGN_DATE as designDate,
DRAWING_DO as drawingDo,
APPRAISAL_UNIT as appraisalUnit,
APPRAISAL_DATE as appraisalDate,
DESIGN_DOC as designDoc,
DESIGN_STANDARD as designStandard
from idx_biz_jg_design_info
where RECORD = #{id}
</select>
</mapper>
package com.yeejoin.amos.boot.module.jg.biz.config;
import org.typroject.tyboot.core.foundation.exception.BaseException;
public class LocalBadRequest extends BaseException {
public LocalBadRequest(String message)
{
super(message, com.yeejoin.amos.component.robot.BadRequest.class.getSimpleName(),message);
this.httpStatus = 500;
}
}
\ No newline at end of file
......@@ -38,7 +38,7 @@ public class JgUseRegistrationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "批量删除", notes = "批量删除")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<Object> save(@RequestBody JSONObject map) {
jgUseRegistrationServiceImpl.save(map);
return ResponseHelper.buildResponse("ok");
......@@ -72,7 +72,7 @@ public class JgUseRegistrationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/deleteMessage")
@ApiOperation(httpMethod = "POST", value = "批量删除", notes = "批量删除")
@ApiOperation(httpMethod = "POST", value = "删除", notes = "删除")
public ResponseModel<Object> deleteMessage(@RequestParam("id") Long id) {
ArrayList<Long> ids = new ArrayList<>();
ids.add(id);
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
import com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
......@@ -11,6 +12,7 @@ import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import com.yeejoin.amos.feign.workflow.model.TaskResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.List;
......@@ -32,7 +34,7 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
String devMessage = e.getDevMessage();
devMessage = devMessage.contains(";") ? devMessage.split(";")[0] : devMessage;
log.error(devMessage);
throw new RuntimeException(devMessage);
throw new LocalBadRequest(devMessage);
} catch (Exception e) {
log.error("调用工作流批量启动失败", e);
throw new RuntimeException("调用工作流批量启动失败");
......@@ -51,7 +53,7 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
String devMessage = e.getDevMessage();
devMessage = devMessage.contains(";") ? devMessage.split(";")[0] : devMessage;
log.error(devMessage);
throw new RuntimeException(devMessage);
throw new LocalBadRequest(devMessage);
} catch (Exception e) {
log.error("调用工作流完成任务接口失败", e);
throw new RuntimeException("调用工作流完成任务接口失败");
......
......@@ -276,6 +276,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
@Transactional(rollbackFor = Exception.class)
public JgChangeRegistrationNameDto updateInfo(String submitType, JgChangeRegistrationNameDto jgChangeRegistrationNameDto, String op) {
if (Objects.isNull(jgChangeRegistrationNameDto) || StringUtils.isEmpty(submitType)) {
throw new IllegalArgumentException("参数不能为空");
......
......@@ -694,6 +694,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
taskModelDto.setRelationId(instanceId);
TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtil.copyProperties(jgChangeRegistrationTransfer, taskMessageDto);
taskModelDto.setPageType(this.getPageTypeByCurrentNode(jgChangeRegistrationTransfer.getAuditStatus()));
taskModelDto.setModel(taskMessageDto);
commonService.buildTaskModel(Collections.singletonList(taskModelDto));
}
......
......@@ -214,6 +214,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @param noticeDto 安装告知
*/
@SuppressWarnings({"rawtypes", "Duplicates"})
@Transactional
public JgInstallationNoticeDto updateInstallationNotice(String submitType, JgInstallationNoticeDto noticeDto, String op) {
if (Objects.isNull(noticeDto) || StringUtils.isEmpty(submitType)) {
throw new IllegalArgumentException("参数不能为空");
......@@ -729,6 +730,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
@Transactional
public void cancel(JgInstallationNoticeDto noticeDto) {
JgInstallationNotice jgInstallationNotice = this.baseMapper.selectById(noticeDto.getSequenceNbr());
ProcessTaskDTO processTaskDTO = iCmWorkflowService.rollBack(jgInstallationNotice.getInstanceId());
......
......@@ -243,6 +243,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
* @param noticeDto 移装告知
*/
@SuppressWarnings({"rawtypes", "Duplicates"})
@Transactional
public JgTransferNoticeDto updateTransferNotice(String submitType, JgTransferNoticeDto noticeDto, String op) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
if (Objects.isNull(noticeDto) || StringUtils.isEmpty(submitType)) {
......@@ -623,6 +624,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
@Transactional
public void cancel(JgTransferNoticeDto noticeDto) {
JgTransferNotice jgInstallationNotice = this.baseMapper.selectById(noticeDto.getSequenceNbr());
ProcessTaskDTO processTaskDTO = iCmWorkflowService.rollBack(jgInstallationNotice.getInstanceId());
......
......@@ -462,6 +462,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject.put("nextExecuteUser", data.getNextExecuteIds());
jsonObject.put("taskType", BusinessTypeEnum.JG_USAGE_REGISTRATION.getCode());
jsonObject.put("equipId", jgUseRegistrationEq.getEquId());
jsonObject.put("flowStatus", commonServiceImpl.getDictionaryCodeByName(jgUseRegistration.getStatus()));
jsonObject.put("flowStatusLabel", jgUseRegistration.getStatus());
if (!WorkFlowStatusEnum.USE_SUBMIT.getCode().equals(taskCode)) {
jsonObject.put("pageType", "look");
}
......@@ -495,17 +497,23 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
Map<String, Object> detail = this.baseMapper.getDetail(id);
Map<String, Object> inspectDetail = this.baseMapper.getInspectDetail(id);
Map<String, Object> useDetail = this.baseMapper.getUseDetail(id);
Map<String, Object> useDestail = this.baseMapper.getDesDetail(id);
if (!ObjectUtils.isEmpty(inspectDetail)) {
detail.putAll(inspectDetail);
}
if (!ObjectUtils.isEmpty(useDetail)) {
detail.putAll(useDetail);
}
if (!ObjectUtils.isEmpty(useDestail)) {
detail.putAll(useDestail);
}
detail.put("proDuctPhoto", JSON.parse(String.valueOf(detail.get("proDuctPhoto"))));
detail.put("factoryStandard", JSON.parse(String.valueOf(detail.get("factoryStandard"))));
detail.put("productQualityYieldProve", JSON.parse(String.valueOf(detail.get("productQualityYieldProve"))));
detail.put("insUseMaintainExplanin", JSON.parse(String.valueOf(detail.get("insUseMaintainExplanin"))));
detail.put("inspectReport", JSON.parse(String.valueOf(detail.get("inspectReport"))));
detail.put("designStandard", JSON.parse(String.valueOf(detail.get("designStandard"))));
detail.put("designDoc", JSON.parse(String.valueOf(detail.get("designDoc"))));
return detail;
}
......
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