Commit c8ba0810 authored by LiuLin's avatar LiuLin

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

parents 52aaa3fd 1736333c
......@@ -28,6 +28,11 @@ public class BaseController {
@Autowired
protected HttpServletRequest request;
public static final String COMPANY_TYPE_COMPANY = "company";
public static final String COMPANY_TYPE_SUPERVISION = "supervision";
/**
* 获取token
**/
......
......@@ -258,4 +258,6 @@ public class JgInstallationNoticeDto extends BaseDto {
*/
private String createUserName;
private String factoryNum;
}
......@@ -136,4 +136,15 @@ public class JgEnableDisable extends BaseEntity {
*/
@TableField(value = "next_task_id")
private String nextTaskId;
@TableField(value = "create_user_company_name")
private String createUserCompanyName;
@TableField(exist = false)
private String equList;
@TableField(exist = false)
private String supervisoryCode;
}
......@@ -414,5 +414,13 @@ public class JgInstallationNotice extends BaseEntity {
@TableField("\"create_user_name\"")
private String createUserName;
/**
* 设备出场编号
*/
// @TableField("\"factory_num\"")
@TableField(exist = false)
private String factoryNum;
}
......@@ -32,8 +32,8 @@ public enum BusinessTypeEnum {
JG_RENOVATION_REGISTRATION("111", "改造变更登记"),
JG_EQUIPMENT_STOP("112-1", "设备启用"),
JG_EQUIPMENT_START("112-2", "设备停用"),
JG_EQUIPMENT_START("112-1", "设备启用"),
JG_EQUIPMENT_STOP("112-2", "设备停用"),
JG_EQUIPMENT_MOVE("113-1", "移装报废"),
JG_EQUIPMENT_CANCEL("113-2", "注销报废"),
......
package com.yeejoin.amos.boot.module.jg.api.enums;
import lombok.Getter;
import org.apache.commons.compress.utils.Lists;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* 业务类型枚举
*
* @author Administrator
*/
@Getter
public enum CompanyTypeEnum {
/**
* 单位类型枚举
*/
SUPERVISION("supervision","supervision", "监管机构"),
USE("company","use", "使用单位"),
DESIGN("company","design", "设计单位"),
MANUFACTURE("company","manufacture", "制造单位"),
FILLING("company","filling", "充装单位"),
INDIVIDUAL("company","individual", "个人"),
CONSTRUCTION("company","construction", "安装改造维修单位"),
INSPECTION("company","inspection", "检验检测机构");
private final String level;
private final String code;
private final String name;
CompanyTypeEnum(String level, String code, String name) {
this.level = level;
this.code = code;
this.name = name;
}
public static String getNameByType(String code) {
String name = null;
for (CompanyTypeEnum enumOne : CompanyTypeEnum.values()) {
if (enumOne.getCode().equals(code)) {
name = enumOne.getName();
break;
}
}
return name;
}
public static String decideCompanyLevel(String str) {
List<CompanyTypeEnum> typeList = getCompanyTypeEnums(str);
if (typeList == null) return null;
String result;
Set<String> set = new HashSet<>();
for (CompanyTypeEnum one : typeList) {
set.add(one.getLevel());
}
result = String.join(",", set);
return result;
}
private static List<CompanyTypeEnum> getCompanyTypeEnums(String str) {
if (ValidationUtil.isEmpty(str)) {
return null;
}
String companyType = null;
List<CompanyTypeEnum> typeList = Lists.newArrayList();
for (CompanyTypeEnum enumOne : CompanyTypeEnum.values()) {
if (str.contains(enumOne.getName())) {
typeList.add(enumOne);
}
}
if (ValidationUtil.isEmpty(typeList)) {
return null;
}
return typeList;
}
public static String decideCompanyCode(String str) {
List<CompanyTypeEnum> typeList = getCompanyTypeEnums(str);
if (typeList == null) return null;
String result;
Set<String> set = new HashSet<>();
for (CompanyTypeEnum one : typeList) {
set.add(one.getCode());
}
result = String.join(",", set);
return result;
}
public static String decideCompanyType(String str) {
List<CompanyTypeEnum> typeList = getCompanyTypeEnums(str);
if (typeList == null) return null;
String result;
Set<String> set = new HashSet<>();
for (CompanyTypeEnum one : typeList) {
set.add(one.getName());
}
result = String.join(",", set);
return result;
}
}
......@@ -24,5 +24,5 @@ public interface JgChangeRegistrationNameMapper extends BaseMapper<JgChangeRegis
void deleteHistoryInfoById(@Param("code") String code);
Page<Map<String, Object>> getListPage(@Param("page") Page<Map<String, Object>> page, @Param("dto") JgChangeRegistrationNameDto dto, @Param("roleIds") List<String> roleIds, @Param("orgCode") String orgCode);
Page<Map<String, Object>> getListPage(@Param("page") Page<Map<String, Object>> page, @Param("dto") JgChangeRegistrationNameDto dto, @Param("roleIds") List<String> roleIds, @Param("companyCode") String companyCode);
}
......@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract;
import com.yeejoin.amos.boot.module.jg.api.vo.EquipMessageVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
......@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice;
import netscape.javascript.JSObject;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
......@@ -69,4 +68,11 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @return pdf文件路径
*/
void generateInstallationNoticeReport(Long sequenceNbr, HttpServletResponse response);
/**
* 获取登录人所在企业类型
*
* @return
*/
Map<String,Object> getCompanyType();
}
......@@ -56,10 +56,10 @@
</foreach>
</if>
<if test="dto.type == 'supervision'">
AND ur.receive_org_code = #{orgCode}
AND ur.receive_org_code = #{companyCode}
</if>
<if test="dto.type == 'enterprise' ">
and ur.use_unit_credit_code = #{orgCode}
<if test="dto.type == 'company'">
and ur.use_unit_credit_code = #{dto.useUnitCreditCode}
</if>
</where>
order by ur.rec_date desc
......
......@@ -51,9 +51,15 @@
AND isn.receive_org_credit_code = #{orgCode}
AND isn.instance_id is not null
</if>
<if test="type == 'enterprise'">
<if test="type == 'company'">
AND isn.install_unit_credit_code = #{orgCode}
</if>
<if test="type == 'testAdmin'">
((AND isn.receive_org_credit_code = #{orgCode}
AND isn.instance_id is not null)
or
AND isn.install_unit_credit_code = #{orgCode})
</if>
</where>
ORDER BY
isn.create_date DESC
......@@ -75,10 +81,13 @@
isn.install_leader_name AS installLeaderName,
isn.install_leader_phone AS installLeaderPhone,
isn.use_unit_name AS useUnitName,
tec2.name AS equCategory,
tec1.name AS equList,
tec.name AS equDefine,
isn.equ_register_code AS equRegisterCode,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
......@@ -118,6 +127,9 @@
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
LEFT JOIN amos_tzs_biz.tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
WHERE
isn.sequence_nbr = #{sequenceNbr}
LIMIT 1
......
......@@ -3,27 +3,20 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
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.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javafx.scene.chart.ValueAxis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -199,8 +192,4 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse("");
}
}
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto;
import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -40,6 +41,7 @@ public class JgChangeRegistrationNameController extends BaseController {
@Autowired
JgChangeRegistrationNameServiceImpl jgChangeRegistrationNameService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增/新增并提交", notes = "新增/新增并提交")
......@@ -109,7 +111,14 @@ public class JgChangeRegistrationNameController extends BaseController {
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<Map<String, Object>> page = new Page<>(current, size);
return ResponseHelper.buildResponse(jgChangeRegistrationNameService.getList(dto, page, dto.getRoleIds()));
ReginParams reginParams = getSelectedOrgInfo();
if(reginParams.getCompany().getLevel().equals(COMPANY_TYPE_COMPANY)){
dto.setType(COMPANY_TYPE_COMPANY);
dto.setUseUnitCreditCode(reginParams.getCompany().getCompanyCode());
} else {
dto.setType(COMPANY_TYPE_SUPERVISION);
}
return ResponseHelper.buildResponse(jgChangeRegistrationNameService.getList(dto, page, dto.getRoleIds(),reginParams.getCompany().getCompanyCode()));
}
......
......@@ -12,7 +12,6 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import netscape.javascript.JSObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -135,6 +134,7 @@ public class JgInstallationNoticeController extends BaseController {
) {
Page<JgInstallationNotice> page = new Page<>(current, size);
ReginParams reginParams = getSelectedOrgInfo();
type = (String) iJgInstallationNoticeService.getCompanyType().get("companyType");
return ResponseHelper.buildResponse(iJgInstallationNoticeService.queryForJgInstallationNoticePage(page, model, type, reginParams));
}
......
......@@ -411,6 +411,8 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jsonObject.put("nextTaskId", jgChangeRegistrationName.getNextTaskId());
jsonObject.put("nextExecuteUser", jgChangeRegistrationName.getNextExecutorIds());
jsonObject.put("taskType", BusinessTypeEnum.JG_NAME_CHANGE_REGISTRATION.getCode());
jsonObject.put("flowStatus", this.getTaskCodeByName(jgChangeRegistrationName.getAuditStatus()));
jsonObject.put("flowStatusLabel", jgChangeRegistrationName.getAuditStatus());
commonService.rollbackTask(instanceId, jsonObject);
}
......@@ -598,16 +600,13 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
return map;
}
public Page<Map<String, Object>> getList(JgChangeRegistrationNameDto dto, Page<Map<String, Object>> page, List<String> roleIds) {
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
String orgCode = reginParams.getCompany().getCompanyCode();
public Page<Map<String, Object>> getList(JgChangeRegistrationNameDto dto, Page<Map<String, Object>> page, List<String> roleIds, String companyCode) {
if (org.apache.commons.lang3.StringUtils.isNotBlank(dto.getReceiveOrgCode())) {
String[] receiveOrgIdList = dto.getReceiveOrgCode().split("_");
if (receiveOrgIdList.length > 1) {
dto.setReceiveOrgCode(receiveOrgIdList[0]);
}
}
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page, dto, roleIds, orgCode);
return listPage;
return this.baseMapper.getListPage(page, dto, roleIds, companyCode);
}
}
\ No newline at end of file
......@@ -275,7 +275,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
// 驳回操作
jgChangeRegistrationReform.setAuditStatus(WorkFlowStatusEnum.getMessage(taskCode).getReject());
jgChangeRegistrationReform.setStatus(WorkFlowStatusEnum.getMessage(taskCode).getReject());
jgChangeRegistrationReform.setPromoter(null);
jgChangeRegistrationReform.setPromoter("");
}
if(updateTodoAndCreate) {
// 上个代办改为已办
......@@ -367,13 +367,17 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform.setStatus(WorkFlowStatusEnum.getMessage(taskCode).getRollBack());
}
jgChangeRegistrationReform.setPromoter(reginParams.getUserModel().getUserId());
jgChangeRegistrationReform.setNextTaskId(workflowResultDto.getNextTaskId());
jgChangeRegistrationReform.setNextExecutorIds(role);
this.update(jgChangeRegistrationReform, lambda);
// commonServiceImpl.deleteTaskModel(instanceId);
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(jgChangeRegistrationReform));
jsonObject.put("flowStatus", commonServiceImpl.getDictionaryCodeByName(jgChangeRegistrationReform.getAuditStatus()));
jsonObject.put("flowStatusLabel", jgChangeRegistrationReform.getAuditStatus());
jsonObject.put("nextTaskId", jgChangeRegistrationReform.getNextTaskId());
jsonObject.put("nextExecuteUser", jgChangeRegistrationReform.getNextExecutorIds());
jsonObject.put("taskType",BusinessTypeEnum.JG_RENOVATION_REGISTRATION.getCode());
jsonObject.put("model",jgChangeRegistrationReform);
commonServiceImpl.rollbackTask(instanceId,jsonObject);
}
......
......@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
......@@ -38,6 +39,7 @@ import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.component.robot.AmosRequestContext;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.TaskV2Model;
import com.yeejoin.amos.feign.workflow.Workflow;
......@@ -195,7 +197,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
Map<String, Object> map = equipmentInfos.get(0);
BeanUtil.copyProperties(installationInfo, map, "equList", "supervisoryCode");
BeanUtil.copyProperties(installationInfo, map, "equList", "supervisoryCode", "factoryNum");
return new HashMap<String, Map<String, Object>>() {{
this.put("installationInfo", map);
}};
......@@ -208,7 +210,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
*/
@SuppressWarnings({"rawtypes", "Duplicates"})
public JgInstallationNoticeDto updateInstallationNotice(String submitType, JgInstallationNoticeDto 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)) {
throw new IllegalArgumentException("参数不能为空");
}
......@@ -524,7 +525,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskModelDto.setStartDate(item.getCreateDate());
taskModelDto.setModel(item);
taskModelDto.setNextExecuteUser(item.getNextExecuteIds());
taskModelDto.setTaskContent(String.format("来自%s【%s】的业务办理,【申请单号:%s】", item.getEquList(), item.getEquRegisterCode(), item.getApplyNo()));
taskModelDto.setTaskContent(String.format("来自%s【%s】的业务办理,【申请单号:%s】", item.getEquList(), StringUtils.isEmpty(item.getFactoryNum()) ? "" : item.getFactoryNum(), item.getApplyNo()));
taskModelDtoList.add(taskModelDto);
});
commonService.buildTaskModel(taskModelDtoList);
......@@ -551,6 +552,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
dto.setEntrustingUnitName(dto.getUseUnitName());
dto.setCreateUserCompanyName(reginParams.getCompany().getCompanyName());
dto.setEquRegisterCode(String.valueOf(obj.get("EQU_CODE")));
dto.setFactoryNum(String.valueOf(obj.get("FACTORY_NUM")));
StringBuffer buffer = new StringBuffer();
buffer.append(dto.getProvinceName()).append(dto.getCityName()).append(dto.getCountyName()).append(dto.getAddress());
dto.setEquAddress(buffer.toString());
......@@ -886,6 +888,32 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override
public Map<String, Object> getCompanyType() {
Map<String, Object> result = new HashMap<>();
result.put("companyType", "");
List<CompanyModel> companyModels = FeignUtil.remoteCall(() -> Privilege.companyClient.queryListByChild(RequestContext.getExeUserId()));
if (companyModels.isEmpty()) {
return result;
}
CompanyModel currentCompany = companyModels.get(0);
result.put("creditCode", currentCompany.getCompanyCode());
String companyLevel = CompanyTypeEnum.decideCompanyLevel(currentCompany.getCompanyType());
String companyType = CompanyTypeEnum.decideCompanyCode(currentCompany.getCompanyType());
String companyTypeName = CompanyTypeEnum.decideCompanyType(currentCompany.getCompanyType());
if (!ValidationUtil.isEmpty(companyLevel)) {
result.put("companyLevel", companyLevel);
if (companyLevel.contains(",")) {
result.put("companyLevel", "testAdmin");
}
}
if (!ValidationUtil.isEmpty(companyType)) {
result.put("companyType", companyType);
}
if (!ValidationUtil.isEmpty(companyTypeName)) {
result.put("companyTypeName", companyTypeName);
}
return result;
}
}
\ No newline at end of file
......@@ -706,6 +706,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskMap.put("relationId", jgMaintainNotice.getInstanceId());
taskMap.put("flowStatus", FlowStatusEnum.TO_BE_FINISHED.getCode());
taskMap.put("flowStatusLabel", FlowStatusEnum.TO_BE_FINISHED.getName());
taskMap.put("model", jgMaintainNotice);
commonService.updateTaskModel(taskMap);
} else {
jgMaintainNotice.setNextExecuteIds(workflowResultDto.getNextExecutorRoleIds());
......
......@@ -240,6 +240,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
jsonObject.put("nextTaskId", contract.getNextTaskId());
jsonObject.put("nextExecuteUser", contract.getNextExecuteIds());
jsonObject.put("taskType", BusinessTypeEnum.JG_MAINTENANCE_RECORD.getCode());
jsonObject.put("flowStatus", this.getTaskCodeByName(contract.getStatus()));
jsonObject.put("flowStatusLabel", contract.getStatus());
commonService.rollbackTask(instanceId, jsonObject);
}
......@@ -285,9 +287,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
JgMaintenanceContract contract = new JgMaintenanceContract();
boolean hasId = StringUtils.isEmpty(contractDto.getSequenceNbr());//没有id说明是新增
BeanUtils.copyProperties(contractDto, contract);
contract.setCreateUserId(reginParams.getUserModel().getUserId());
contract.setCreateUserName(reginParams.getUserModel().getRealName());
if (hasId) {
contract.setCreateUserId(reginParams.getUserModel().getUserId());
contract.setCreateUserName(reginParams.getUserModel().getRealName());
contract.setStatus(SUBMIT_DATA.equals(submit) ? WorkFlowStatusEnum.MAIN_SUBMIT.getPass() : WorkFlowStatusEnum.MAIN_RECEIVE.getPass());
this.save(contract);
} else {
......@@ -338,6 +340,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract.setInstanceId(instanceId);
contract.setNextExecuteIds(String.join(",", roleListNext));
contract.setNextTaskId(nextTaskId);
contract.setStatus(String.valueOf(WorkFlowStatusEnum.MAIN_RECEIVE.getPass()));
contract.setNextExecuteUserIds(nextUserIds);
// 创建待办
JgMaintenanceContract bean = new JgMaintenanceContract();
......@@ -437,7 +440,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract.setNextExecuteUserIds("");
contract.setApplyDate(new Date());
contract.setStatus(taskCode);
updateTaskModel(contract, operate);
updateTaskModel(contract, "0");
}
this.getBaseMapper().updateById(contract);
}
......@@ -450,6 +453,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
params.put("taskStatusLabel", flowStatusEnum.getName());
params.put("flowStatus", this.getTaskStatusByName(contract.getStatus()));
params.put("flowStatusLabel", contract.getStatus());
params.put("model", contract);
return commonService.updateTaskModelNew(params);
}
......
......@@ -311,7 +311,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
private String buildTaskContent(String supervisoryCode, String cancelType, String applyNo) {
// 来自电梯【X3100-123456】【移装注销】的业务办理【申请单号:ABCD0000001】
String type = "1".equals(cancelType) ? "报废注销" : "移装注销";
return String.format(template, supervisoryCode, type, applyNo);
return String.format(template, Objects.isNull(supervisoryCode) ? "无" : supervisoryCode, type, applyNo);
}
public void deleteBatch(List<Long> ids) {
......@@ -386,7 +386,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
jgScrapCancelDto.setNextTaskId(nextTaskId);
// 更新下一步可执行人
jgScrapCancelDto.setNextExecuteUserIds(nextUserIds);
executeOneStep(jgScrapCancelDto, taskName, nextUserIds, op);
JgScrapCancel jgScrapCancel = new JgScrapCancel();
BeanUtils.copyProperties(jgScrapCancelDto, jgScrapCancel);
createTaskModel(jgScrapCancel, taskName, "1", nextUserIds);
}
JgScrapCancel cancel = new JgScrapCancel();
BeanUtils.copyProperties(jgScrapCancelDto, cancel);
......@@ -443,7 +445,6 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
BeanUtil.copyProperties(taskV2Model, modelDto);
modelDto.setNextExecuteUser(jgScrapCancelDto.getNextExecuteIds());
modelDto.setModel(jgScrapCancelDto);
// 再插入新代办、数据待定
commonService.buildTaskModel(Collections.singletonList(modelDto));
}
......@@ -528,7 +529,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
String nextUserIds = workflowResultDtos.get(0).getNextExecutorUserIds();
jgScrapCancel.setNextExecuteUserIds(nextUserIds);
jgScrapCancel.setPromoter(reginParams.getUserModel().getUserId());
jgScrapCancel.setNextExecuteIds(Objects.isNull(workflowResultDto) ? null : workflowResultDto.getNextExecutorRoleIds());
jgScrapCancel.setNextExecuteIds(workflowResultDto.getNextExecutorRoleIds());
this.update(jgScrapCancel, lambda);
// 删除待办
......@@ -536,9 +537,15 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
jsonObject.put("nextTaskId", jgScrapCancel.getNextTaskId());
jsonObject.put("nextExecuteUser", jgScrapCancel.getNextExecuteIds());
jsonObject.put("taskType", businessTypeJudgment(jgScrapCancel.getCancelType()).getCode());
jsonObject.put("flowStatus", this.getTaskCodeByName(jgScrapCancel.getAuditStatus()));
jsonObject.put("flowStatusLabel", jgScrapCancel.getAuditStatus());
commonService.rollbackTask(instanceId, jsonObject);
}
private Integer getTaskCodeByName(String auditStatus) {
return commonService.getDictionaryCodeByName(auditStatus);
}
@Transactional
public void flowExecute(Long id, String instanceId, String operate, String comment) {
try {
......
......@@ -55,15 +55,15 @@
},
{
"type": "106",
"pageType": "look",
"pageType": "edit",
"name": "维保备案",
"url": "/mixuap?appId=1742358052905971713&id=1735612073380966402&roleIds={roleIds}&userId={userId}&pageType=look"
"url": "/mixuap?appId=1742358052905971713&id=1735612073380966402&roleIds={roleIds}&userId={userId}&pageType=edit"
},
{
"type": "106",
"pageType": "edit",
"pageType": "look",
"name": "维保备案",
"url": "/mixuap?appId=1742358052905971713&id=1735612073380966402&roleIds={roleIds}&userId={userId}&pageType=edit"
"url": "/mixuap?appId=1742358052905971713&id=1735612073380966402&roleIds={roleIds}&userId={userId}&pageType=look"
},
{
"type": "107",
......@@ -93,13 +93,13 @@
"type": "109",
"pageType": "look",
"name": "单位变更登记",
"url": "/mixuap?appId=1742358052905971713&id=1739250036920840194&roleIds={roleIds}&userId={userId}&pageType=look"
"url": "/mixuap?appId=1742358052905971713&id=1738095060211232770&roleIds={roleIds}&userId={userId}&pageType=look"
},
{
"type": "109",
"pageType": "edit",
"name": "单位变更登记",
"url": "/mixuap?appId=1742358052905971713&id=1739250036920840194&roleIds={roleIds}&userId={userId}&pageType=edit"
"url": "/mixuap?appId=1742358052905971713&id=1738095060211232770&roleIds={roleIds}&userId={userId}&pageType=edit"
},
{
"type": "110",
......
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