Commit a19fb881 authored by chenzhao's avatar chenzhao

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

parents f59931b7 df725516
...@@ -101,6 +101,9 @@ public class JgInstallationNoticeDto extends BaseDto { ...@@ -101,6 +101,9 @@ public class JgInstallationNoticeDto extends BaseDto {
@ApiModelProperty(value = "产权单位") @ApiModelProperty(value = "产权单位")
private String propertyUnitName; private String propertyUnitName;
@ApiModelProperty("产权单位统一信用代码")
private String propertyUnitCreditCode;
@ApiModelProperty(value = "使用单位id") @ApiModelProperty(value = "使用单位id")
private String useUnitCreditCode; private String useUnitCreditCode;
...@@ -266,4 +269,14 @@ public class JgInstallationNoticeDto extends BaseDto { ...@@ -266,4 +269,14 @@ public class JgInstallationNoticeDto extends BaseDto {
private String transferToUserIds; private String transferToUserIds;
/**
* 属地监管部门code
*/
private String orgBranchCode;
/**
* '属地监管部门name'
*/
private String orgBranchName;
} }
...@@ -429,4 +429,16 @@ public class JgInstallationNotice extends BaseEntity { ...@@ -429,4 +429,16 @@ public class JgInstallationNotice extends BaseEntity {
@TableField(value = "transfer_to_user_ids") @TableField(value = "transfer_to_user_ids")
private String transferToUserIds; private String transferToUserIds;
/**
* 属地监管部门code
*/
@TableField(value = "org_branch_code")
private String orgBranchCode;
/**
* 属地监管部门name
*/
@TableField(value = "org_branch_name")
private String orgBranchName;
} }
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<if test="dto.type == 'company'"> <if test="dto.type == 'company'">
and ur.use_unit_credit_code = #{dto.useUnitCreditCode} and ur.use_unit_credit_code = #{dto.useUnitCreditCode}
</if> </if>
and (1=1 or ur.transfer_to_user_ids like concat('%',#{currentUserId},'%')) OR (ur.transfer_to_user_ids LIKE concat ('%', #{currentUserId}, '%') AND ur.is_delete = 0)
</where> </where>
order by ur.rec_date desc order by ur.rec_date desc
</select> </select>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
and ur.use_unit_credit_code = #{dto.useUnitCreditCode} and ur.use_unit_credit_code = #{dto.useUnitCreditCode}
</if> </if>
<if test="currentUserId != null and currentUserId != '' "> <if test="currentUserId != null and currentUserId != '' ">
or ur.transfer_to_user_ids like concat('%',#{currentUserId},'%') or(ur.transfer_to_user_ids like concat('%',#{currentUserId},'%') and ur.is_delete = 0)
</if> </if>
</where> </where>
order by ur.rec_date desc order by ur.rec_date desc
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
ur.apply_no as applyNo, ur.apply_no as applyNo,
ifnull(ur.next_executor_ids,'') as nextExecutorIds, ifnull(ur.next_executor_ids,'') as nextExecutorIds,
ur.promoter, ur.promoter,
ur.supervisory_code as supervisoryCode,
ur.next_execute_user_ids as nextExecuteUserIds ur.next_execute_user_ids as nextExecuteUserIds
from tzs_jg_change_registration_reform ur from tzs_jg_change_registration_reform ur
LEFT JOIN tzs_jg_change_registration_reform_eq re on ur.sequence_nbr = re.equip_transfer_id LEFT JOIN tzs_jg_change_registration_reform_eq re on ur.sequence_nbr = re.equip_transfer_id
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
AND crt.use_unit_credit_code = #{dto.unitCode} AND crt.use_unit_credit_code = #{dto.unitCode}
</if> </if>
<if test="currentUserId != null and currentUserId != '' "> <if test="currentUserId != null and currentUserId != '' ">
or crt.transfer_to_user_ids like concat('%',#{currentUserId},'%') or (crt.transfer_to_user_ids like concat('%',#{currentUserId},'%') and crt.is_delete = 0)
</if> </if>
</where> </where>
order by crt.rec_date desc order by crt.rec_date desc
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
instance_status like concat('%',#{role},'%') instance_status like concat('%',#{role},'%')
</foreach> </foreach>
</if> </if>
and (1=1 or isn.transfer_to_user_ids like concat('%',#{currentUserId},'%')) OR (isn.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) and isn.is_delete = false )
</where> </where>
ORDER BY ORDER BY
isn.create_date DESC, isn.apply_no DESC isn.create_date DESC, isn.apply_no DESC
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<if test="dto.applyType != null and dto.applyType != ''"> <if test="dto.applyType != null and dto.applyType != ''">
and jed.apply_type = #{dto.applyType} and jed.apply_type = #{dto.applyType}
</if> </if>
or jed.transfer_to_user_ids like concat('%',#{userId},'%') OR (jed.transfer_to_user_ids like concat('%',#{userId},'%') AND jed.is_delete = 0 )
</where> </where>
order by jed.rec_date desc order by jed.rec_date desc
</select> </select>
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
and (1=1 or jet.transfer_to_user_ids like concat('%',#{currentUserId},'%')) OR (jet.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) AND jet.is_delete = 0 )
</where> </where>
ORDER BY jet.apply_date DESC ORDER BY jet.apply_date DESC
</select> </select>
......
...@@ -24,18 +24,20 @@ ...@@ -24,18 +24,20 @@
isn.instance_status AS instanceStatus, isn.instance_status AS instanceStatus,
<!-- isn.equ_address AS equAddress,--> <!-- isn.equ_address AS equAddress,-->
isn.handle_date AS handleDate, isn.handle_date AS handleDate,
isn.equ_list AS equList, <!-- isn.equ_list AS equList,-->
ec.name AS equList,
isn.notice_report_url AS noticeReportUrl, isn.notice_report_url AS noticeReportUrl,
isn.create_user_id as createUserId, isn.create_user_id as createUserId,
isn.next_taskId AS nextTaskId, isn.next_task_id AS nextTaskId,
isn.next_execute_user_ids as nextExecuteUserIds, isn.next_execute_user_ids as nextExecuteUserIds,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as equAddress concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as equAddress
FROM tzs_jg_installation_notice isn FROM tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_installation_notice_eq insEq on insEq.equip_transfer_id = isn.sequence_nbr LEFT JOIN tzs_jg_installation_notice_eq insEq on insEq.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_use_info ibjui on insEq.equ_id = ibjui.RECORD LEFT JOIN idx_biz_jg_use_info ibjui on insEq.equ_id = ibjui.RECORD
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = insEq.equ_id
LEFT JOIN tz_equipment_category ec ON ec.code = ri.equ_category
<where> <where>
isn.is_delete = false isn.is_delete = false
AND (1=1 or isn.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
<if test="param != null "> <if test="param != null ">
<if test="param.applyNo != null and param.applyNo != ''"> <if test="param.applyNo != null and param.applyNo != ''">
AND isn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%') AND isn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
...@@ -66,6 +68,7 @@ ...@@ -66,6 +68,7 @@
or or
AND isn.install_unit_credit_code = #{orgCode}) AND isn.install_unit_credit_code = #{orgCode})
</if> </if>
or (isn.is_delete = false and isn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%'))
</where> </where>
ORDER BY ORDER BY
isn.create_date DESC isn.create_date DESC
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<if test="type == 'company'"> <if test="type == 'company'">
AND isn.install_unit_credit_code = #{orgCode} AND isn.install_unit_credit_code = #{orgCode}
</if> </if>
or isn.transfer_to_user_ids like concat('%',#{userId},'%') OR (isn.transfer_to_user_ids like concat('%',#{userId},'%') AND isn.is_delete = 0 )
</where> </where>
ORDER BY ORDER BY
isn.apply_no DESC isn.apply_no DESC
......
...@@ -175,8 +175,7 @@ ...@@ -175,8 +175,7 @@
and receive_org_code = #{contractDto.receiveOrgCodeFilter} and receive_org_code = #{contractDto.receiveOrgCodeFilter}
</if> </if>
-- 转办隔离逻辑 -- 转办隔离逻辑
and (1=1 or transfer_to_user_ids like concat('%',#{currentUserId},'%')) OR (transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) and is_delete = 0)
-- 数据过滤结束 ---------------------------------------------------- -- 数据过滤结束 ----------------------------------------------------
</where> </where>
order by apply_no desc order by apply_no desc
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<if test="type == 'company'"> <if test="type == 'company'">
AND isn.install_unit_credit_code = #{orgCode} AND isn.install_unit_credit_code = #{orgCode}
</if> </if>
and (1=1 or isn.transfer_to_user_ids like concat('%',#{currentUserId},'%')) OR (isn.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) AND isn.is_delete = 0 )
</where> </where>
ORDER BY ORDER BY
isn.apply_no DESC isn.apply_no DESC
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
tjtn.create_user_id as createUserId, tjtn.create_user_id as createUserId,
tjtn.next_execute_user_ids as nextExecuteUserIds, tjtn.next_execute_user_ids as nextExecuteUserIds,
oi.SUPERVISORY_CODE as supervisoryCode, oi.SUPERVISORY_CODE as supervisoryCode,
tjtn.next_taskId AS nextTaskId, tjtn.next_task_id AS nextTaskId,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as equAddress concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as equAddress
FROM FROM
tzs_jg_transfer_notice tjtn tzs_jg_transfer_notice tjtn
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
left join idx_biz_jg_other_info oi on oi.RECORD = re.equ_id left join idx_biz_jg_other_info oi on oi.RECORD = re.equ_id
<where> <where>
tjtn.is_delete = false tjtn.is_delete = false
AND (1=1 or tjtn.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
<if test="param != null "> <if test="param != null ">
<if test="param.applyNo != null and param.applyNo != ''"> <if test="param.applyNo != null and param.applyNo != ''">
AND tjtn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%') AND tjtn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
...@@ -88,6 +87,7 @@ ...@@ -88,6 +87,7 @@
or or
AND tjtn.install_unit_credit_code = #{orgCode}) AND tjtn.install_unit_credit_code = #{orgCode})
</if> </if>
or (tjtn.is_delete = false and tjtn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%'))
</where> </where>
ORDER BY ORDER BY
tjtn.apply_no DESC tjtn.apply_no DESC
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
LEFT JOIN idx_biz_jg_other_info other on re.equ_id = other.RECORD LEFT JOIN idx_biz_jg_other_info other on re.equ_id = other.RECORD
<where> <where>
and ur.is_delete = 0 and (1=1 or ur.transfer_to_user_ids like concat('%',#{dto.currentUserId},'%'))
<if test="dto.equCategory != null and dto.equCategory != ''"> <if test="dto.equCategory != null and dto.equCategory != ''">
and jri.EQU_CATEGORY = #{dto.equCategory} and jri.EQU_CATEGORY = #{dto.equCategory}
</if> </if>
...@@ -63,6 +62,7 @@ ...@@ -63,6 +62,7 @@
<if test="dto.dataType == 'company' "> <if test="dto.dataType == 'company' ">
and ur.use_unit_credit_code = #{dto.unitCode} and ur.use_unit_credit_code = #{dto.unitCode}
</if> </if>
OR (ur.transfer_to_user_ids LIKE concat ( '%', #{dto.currentUserId}, '%' ) AND ur.is_delete = 0 )
</where> </where>
order by ur.rec_date desc order by ur.rec_date desc
</select> </select>
...@@ -121,8 +121,9 @@ ...@@ -121,8 +121,9 @@
SAFETY_MANAGER as safetyManager, SAFETY_MANAGER as safetyManager,
SAFETY_MANAGER_CODE as safetyManagerCode, SAFETY_MANAGER_CODE as safetyManagerCode,
PHONE as phone, PHONE as phone,
ESTATE_UNIT_NAME as estateUnitName, concat(ESTATE_UNIT_CREDIT_CODE, '_', ESTATE_UNIT_NAME) as estateUnitName,
ESTATE_UNIT_CREDIT_CODE as estateUnitCreditCode, -- ESTATE_UNIT_NAME as estateUnitName,
-- ESTATE_UNIT_CREDIT_CODE as estateUnitCreditCode,
ADDRESS as address, ADDRESS as address,
PROVINCE as province, PROVINCE as province,
CITY as city, CITY as city,
......
...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum; ...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
...@@ -228,7 +229,39 @@ public class CommonController extends BaseController { ...@@ -228,7 +229,39 @@ public class CommonController extends BaseController {
@GetMapping(value = "/getCreatTree") @GetMapping(value = "/getCreatTree")
@ApiOperation(httpMethod = "GET", value = "获取管辖分局树", notes = "获取管辖分局树") @ApiOperation(httpMethod = "GET", value = "获取管辖分局树", notes = "获取管辖分局树")
public ResponseModel<Object> getCreatTree() { public ResponseModel<Object> getCreatTree() {
return ResponseHelper.buildResponse(commonService.creatTree()); return ResponseHelper.buildResponse(commonService.getCreatTree());
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getCreatTreeByInstallation")
@ApiOperation(httpMethod = "GET", value = "获取管辖分局树安装告知使用", notes = "获取管辖分局树安装告知使用")
public ResponseModel<Object> getCreatTreeByInstallation(String county) {
List<LinkedHashMap> creatTree = commonService.getCreatTreeByInstallation();
String code = county.split("_")[0];
List<LinkedHashMap> infoByCounty = getInfoByCounty(code, creatTree);
return ResponseHelper.buildResponse(infoByCounty);
}
private List<LinkedHashMap> getInfoByCounty(String county, List<LinkedHashMap> children) {
for (LinkedHashMap item : children) {
if (item.get("level").toString().equals("county") && item.get("companyCode").toString().equals(county)) {
return (List<LinkedHashMap>) item.get("children");
} else {
if (!ObjectUtils.isEmpty(item.get("children"))) {
List<LinkedHashMap> children1 = getInfoByCounty(county, (List<LinkedHashMap>) item.get("children"));
if (!CollectionUtils.isEmpty(children1)) {
return children1;
}
}
}
}
return new ArrayList<>();
} }
......
...@@ -69,6 +69,7 @@ public class JgInstallationNoticeController extends BaseController { ...@@ -69,6 +69,7 @@ public class JgInstallationNoticeController extends BaseController {
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新安装告知", notes = "根据sequenceNbr更新安装告知") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新安装告知", notes = "根据sequenceNbr更新安装告知")
public ResponseModel<JgInstallationNoticeDto> updateBySequenceNbrJgInstallationNotice(@RequestParam String submitType, @RequestBody Map<String, Object> model, @RequestParam(value = "op", required = false) String op) { public ResponseModel<JgInstallationNoticeDto> updateBySequenceNbrJgInstallationNotice(@RequestParam String submitType, @RequestBody Map<String, Object> model, @RequestParam(value = "op", required = false) String op) {
JgInstallationNoticeDto installationInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("installationInfo")), JgInstallationNoticeDto.class, true); JgInstallationNoticeDto installationInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("installationInfo")), JgInstallationNoticeDto.class, true);
installationInfo.setEquList(((LinkedHashMap<?, ?>) model.get("installationInfo")).get("equListDesc").toString());
if (Objects.isNull(installationInfo)) { if (Objects.isNull(installationInfo)) {
throw new IllegalArgumentException("参数installationInfo不能为空"); throw new IllegalArgumentException("参数installationInfo不能为空");
} }
......
...@@ -47,4 +47,10 @@ public interface ICommonService { ...@@ -47,4 +47,10 @@ public interface ICommonService {
Object getCompanyUser(Long companyId); Object getCompanyUser(Long companyId);
Object transfer(Map<String, Object> obj); Object transfer(Map<String, Object> obj);
List<LinkedHashMap> getCreatTree();
List<LinkedHashMap> getCreatTreeByInstallation();
List<LinkedHashMap> getCreatTreeByInstallationTree();
} }
...@@ -277,6 +277,32 @@ public class CommonServiceImpl implements ICommonService { ...@@ -277,6 +277,32 @@ public class CommonServiceImpl implements ICommonService {
@Override @Override
public List<LinkedHashMap> getCreatTree() {
List<LinkedHashMap> result = (List<LinkedHashMap>) redisUtils.get(REGULATOR_UNIT_TREE);
//判断redis是否存在管辖机构树
return !ObjectUtils.isEmpty(result) ? result : creatTree();
}
@Override
public List<LinkedHashMap> getCreatTreeByInstallation() {
List<LinkedHashMap> result = (List<LinkedHashMap>) redisUtils.get(REGULATOR_UNIT_TREE);
//判断redis是否存在管辖机构树
return !ObjectUtils.isEmpty(result) ? result : getCreatTreeByInstallationTree();
}
@Override
public List<LinkedHashMap> getCreatTreeByInstallationTree() {
FeignClientResult tree = privilegeFeginService.queryAgencyTreeForCache(RequestContext.getToken(), RequestContext.getAppKey(), RequestContext.getProduct());
List<LinkedHashMap> result = (List<LinkedHashMap>) tree.getResult();
List<LinkedHashMap> treeData = deleteTreeData(result, REGULATOR_UNIT);
List<LinkedHashMap> supervisionTree = treeData.stream().filter(e -> code.equals(e.get("orgCode"))).collect(Collectors.toList());
List<LinkedHashMap> resultTree = updateNullChildren(supervisionTree);
redisUtils.set(REGULATOR_UNIT_TREE, resultTree);
return resultTree;
}
@Override
public List<LinkedHashMap> getTree(ReginParams reginParams) { public List<LinkedHashMap> getTree(ReginParams reginParams) {
// 企业逻辑 // 企业逻辑
if (reginParams.getCompany().getLevel().equals(BaseController.COMPANY_TYPE_COMPANY)) { if (reginParams.getCompany().getLevel().equals(BaseController.COMPANY_TYPE_COMPANY)) {
......
...@@ -180,7 +180,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR ...@@ -180,7 +180,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgRegistrationHistory.setSupervisoryCode(supervisoryCode); jgRegistrationHistory.setSupervisoryCode(supervisoryCode);
//数据状态 //数据状态
jgChangeRegistrationReform.setUseRegistrationCode(jgRegistrationHistory.getUseRegistrationCode()); jgChangeRegistrationReform.setUseRegistrationCode(jgRegistrationHistory.getUseRegistrationCode());
String equipListName = this.getBaseMapper().getEquiplistNameByEquiplist(Optional.ofNullable(map.get("equList").toString()).orElse(" ")); String equipListName = Optional.ofNullable(map.get("equListDesc").toString()).orElse(" ");
jgChangeRegistrationReform.setEquipListName(equipListName); jgChangeRegistrationReform.setEquipListName(equipListName);
jgChangeRegistrationReform.setCreateUserId(reginParams.getUserModel().getUserId()); jgChangeRegistrationReform.setCreateUserId(reginParams.getUserModel().getUserId());
jgChangeRegistrationReform.setCreateUserName(reginParams.getUserModel().getRealName()); jgChangeRegistrationReform.setCreateUserName(reginParams.getUserModel().getRealName());
......
...@@ -337,7 +337,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -337,7 +337,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
this.flowExecute(oldTransfer.getSequenceNbr(), oldTransfer.getInstanceId(), "0", ""); this.flowExecute(oldTransfer.getSequenceNbr(), oldTransfer.getInstanceId(), "0", "");
} else { } else {
// 如果是新启动的流程开启自动访问 // 如果是新启动的流程开启自动访问
String equipListName = this.getBaseMapper().getEquiplistNameByEquiplist(Optional.ofNullable(tableData.get("equList").toString()).orElse(" ")); String equipListName = Optional.ofNullable(tableData.get("equListDesc").toString()).orElse(" ");
oldTransfer.setAuditStatus(WorkFlowStatusEnum.TRANSFER_RECEIVE.getPass()); oldTransfer.setAuditStatus(WorkFlowStatusEnum.TRANSFER_RECEIVE.getPass());
oldTransfer.setStatus(WorkFlowStatusEnum.TRANSFER_RECEIVE.getPass()); oldTransfer.setStatus(WorkFlowStatusEnum.TRANSFER_RECEIVE.getPass());
oldTransfer.setEquipListName(equipListName); oldTransfer.setEquipListName(equipListName);
......
...@@ -599,9 +599,6 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -599,9 +599,6 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
JgEnableDisableEq jgEnableDisableEq = jgEnableDisableEqMapper.selectOne(new LambdaQueryWrapper<JgEnableDisableEq>().eq(JgEnableDisableEq::getEnableDisableApplyId, sequenceNbr)); JgEnableDisableEq jgEnableDisableEq = jgEnableDisableEqMapper.selectOne(new LambdaQueryWrapper<JgEnableDisableEq>().eq(JgEnableDisableEq::getEnableDisableApplyId, sequenceNbr));
if(!ObjectUtils.isEmpty(jgEnableDisableEq)){ if(!ObjectUtils.isEmpty(jgEnableDisableEq)){
Map<String, Object> map = idxBizJgRegisterInfoService.getDetailFieldCamelCaseByRecord(jgEnableDisableEq.getEquId()); Map<String, Object> map = idxBizJgRegisterInfoService.getDetailFieldCamelCaseByRecord(jgEnableDisableEq.getEquId());
map.put("equListDesc",map.get("equList"));
map.put("equCategoryDesc",map.get("equCategory"));
map.put("equDefineDesc",map.get("equDefine"));
String[] fields = {"productPhoto", "designDoc", "designStandard", "factoryStandard", "productQualityYieldProve", String[] fields = {"productPhoto", "designDoc", "designStandard", "factoryStandard", "productQualityYieldProve",
"insUseMaintainExplain", "inspectReport", "proxyStatementAttachment", "installContractAttachment"}; "insUseMaintainExplain", "inspectReport", "proxyStatementAttachment", "installContractAttachment"};
for (String s : fields) { for (String s : fields) {
......
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper; import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
...@@ -124,6 +125,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -124,6 +125,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
SupervisoryCodeInfoMapper supervisoryCodeInfoMapper; SupervisoryCodeInfoMapper supervisoryCodeInfoMapper;
@Autowired @Autowired
SuperviseInfoMapper superviseInfoMapper;
@Autowired
IIdxBizJgConstructionInfoService constructionInfoService; IIdxBizJgConstructionInfoService constructionInfoService;
@Autowired @Autowired
...@@ -184,6 +188,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -184,6 +188,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if(!ValidationUtil.isEmpty(notice.getFactoryUseSiteStreet()) && !ValidationUtil.isEmpty(notice.getStreetName())) { if(!ValidationUtil.isEmpty(notice.getFactoryUseSiteStreet()) && !ValidationUtil.isEmpty(notice.getStreetName())) {
installationInfo.put("factoryUseSiteStreet", notice.getFactoryUseSiteStreet() + "_" + notice.getStreetName()); installationInfo.put("factoryUseSiteStreet", notice.getFactoryUseSiteStreet() + "_" + notice.getStreetName());
} }
if(!ValidationUtil.isEmpty(notice.getOrgBranchCode()) && !ValidationUtil.isEmpty(notice.getOrgBranchName())) {
installationInfo.put("orgBranchCode", notice.getOrgBranchCode() + "_" + notice.getOrgBranchName());
}
if(!ValidationUtil.isEmpty(notice.getPropertyUnitCreditCode()) && !ValidationUtil.isEmpty(notice.getPropertyUnitName())) {
installationInfo.put("propertyUnitName", notice.getPropertyUnitCreditCode() + "_" + notice.getPropertyUnitName());
}
String[] fields = {"productPhoto", "designDoc", "designStandard", "factoryStandard", String[] fields = {"productPhoto", "designDoc", "designStandard", "factoryStandard",
"productQualityYieldProve", "insUseMaintainExplain", "inspectReport", "productQualityYieldProve", "insUseMaintainExplain", "inspectReport",
...@@ -685,6 +696,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -685,6 +696,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
} }
} }
String propertyUnitName = model.getPropertyUnitName();
if (!ObjectUtils.isEmpty(propertyUnitName)) {
String[] split = propertyUnitName.split("_");
if (split.length > 1) {
model.setPropertyUnitCreditCode(split[0]);
model.setPropertyUnitName(split[1]);
}
}
String county = model.getCounty(); String county = model.getCounty();
if (!ObjectUtils.isEmpty(county)) { if (!ObjectUtils.isEmpty(county)) {
String[] countyList = county.split("_"); String[] countyList = county.split("_");
...@@ -703,6 +724,15 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -703,6 +724,15 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
} }
} }
String branchCodeString = model.getOrgBranchCode();
if (!ObjectUtils.isEmpty(branchCodeString)) {
String[] branchCodeStringList = branchCodeString.split("_");
if (branchCodeStringList.length > 1) {
model.setOrgBranchCode(branchCodeStringList[0]);
model.setOrgBranchName(branchCodeStringList[1]);
}
}
// 分割单位 // 分割单位
String useUnitId = model.getUseUnitCreditCode(); String useUnitId = model.getUseUnitCreditCode();
if (!ObjectUtils.isEmpty(useUnitId)) { if (!ObjectUtils.isEmpty(useUnitId)) {
...@@ -860,6 +890,19 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -860,6 +890,19 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
useInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian() == null ? "0" : jgInstallationNotice.getIsXixian()); useInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian() == null ? "0" : jgInstallationNotice.getIsXixian());
useInfoService.saveOrUpdateData(useInfo); useInfoService.saveOrUpdateData(useInfo);
} }
// 修改属地
LambdaUpdateWrapper<SuperviseInfo> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
lambdaUpdateWrapper.eq(SuperviseInfo::getRecord, jgRelationEquip.getEquId());
SuperviseInfo superviseInfo = new SuperviseInfo();
superviseInfo.setOrgBranchName(jgInstallationNotice.getOrgBranchName());
superviseInfo.setOrgBranchCode(jgInstallationNotice.getOrgBranchCode());
superviseInfoMapper.update(superviseInfo, lambdaUpdateWrapper);
HashMap<String, Object> hashMap = new HashMap<>();
Map<String,Map<String,Object>> superMap = new HashMap<>();
hashMap.put("ORG_BRANCH_CODE",jgInstallationNotice.getOrgBranchCode());
hashMap.put("ORG_BRANCH_NAME",jgInstallationNotice.getOrgBranchCode());
superMap.put(jgRelationEquip.getEquId(), hashMap);
tzsServiceFeignClient.commonUpdateEsDataByIds(superMap);
// 上个代办改为已办 // 上个代办改为已办
HashMap<String, Object> taskMap = new HashMap<>(); HashMap<String, Object> taskMap = new HashMap<>();
taskMap.put("taskStatus", FlowStatusEnum.TO_BE_FINISHED.getCode()); taskMap.put("taskStatus", FlowStatusEnum.TO_BE_FINISHED.getCode());
......
...@@ -146,6 +146,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -146,6 +146,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
map.put("uuseUnitCreditCode",map.get("useUnitCreditCode")); map.put("uuseUnitCreditCode",map.get("useUnitCreditCode"));
map.remove("useUnitCreditCode"); map.remove("useUnitCreditCode");
map.remove("address"); map.remove("address");
map.remove("sequenceNbr");
for (String s : fields) { for (String s : fields) {
if (maintainInfo.containsKey(s) && !ObjectUtils.isEmpty(map.get(s))) if (maintainInfo.containsKey(s) && !ObjectUtils.isEmpty(map.get(s)))
......
...@@ -149,6 +149,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -149,6 +149,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useInfo.setProvinceName("陕西省"); useInfo.setProvinceName("陕西省");
LambdaQueryWrapper<IdxBizJgUseInfo> lambda = new QueryWrapper<IdxBizJgUseInfo>().lambda(); LambdaQueryWrapper<IdxBizJgUseInfo> lambda = new QueryWrapper<IdxBizJgUseInfo>().lambda();
lambda.eq(IdxBizJgUseInfo::getRecord, map.get("equipId")); lambda.eq(IdxBizJgUseInfo::getRecord, map.get("equipId"));
// 产权单位信息
if (map.containsKey("estateUnitName")) {
String[] data = String.valueOf(map.getString("estateUnitName")).split("_");
useInfo.setEstateUnitCreditCode(data[0]);
useInfo.setEstateUnitName(data[1]);
}
// 更新使用信息 // 更新使用信息
useInfoMapper.update(useInfo, lambda); useInfoMapper.update(useInfo, lambda);
InspectionDetectionInfo inspectionDetectionInfo = new InspectionDetectionInfo(); InspectionDetectionInfo inspectionDetectionInfo = new InspectionDetectionInfo();
......
...@@ -449,7 +449,7 @@ ...@@ -449,7 +449,7 @@
<w:sz w:val="24"/> <w:sz w:val="24"/>
</w:rPr> </w:rPr>
<w:pict> <w:pict>
<v:shape id="文本框 9" o:spid="_x0000_s1026" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:-49.05pt;margin-top:125.55pt;height:103.45pt;width:515.75pt;z-index:251662336;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600"> <v:shape id="文本框 9" o:spid="_x0000_s1026" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:-49.05pt;margin-top:120pt;height:150pt;width:515.75pt;z-index:251662336;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600">
<v:path/> <v:path/>
<v:fill on="t" color2="#FFFFFF" focussize="0,0"/> <v:fill on="t" color2="#FFFFFF" focussize="0,0"/>
<v:stroke on="f" weight="0.5pt"/> <v:stroke on="f" weight="0.5pt"/>
...@@ -485,7 +485,7 @@ ...@@ -485,7 +485,7 @@
<w:sz w:val="46"/> <w:sz w:val="46"/>
<w:sz-cs w:val="46"/> <w:sz-cs w:val="46"/>
</w:rPr> </w:rPr>
<w:t>按照《中华人民共和国特种设备安全法》</w:t> <w:t>按照《中华人民共和国特种设备安全法》的规定, 依据特种设备安全技术规范要求,予以使用登记。</w:t>
</w:r> </w:r>
<w:r> <w:r>
<w:rPr> <w:rPr>
...@@ -495,22 +495,22 @@ ...@@ -495,22 +495,22 @@
</w:rPr> </w:rPr>
<w:t></w:t> <w:t></w:t>
</w:r> </w:r>
<w:r> <#-- <w:r>-->
<w:rPr> <#-- <w:rPr>-->
<w:spacing w:val="-13"/> <#-- <w:spacing w:val="-13"/>-->
<w:sz w:val="46"/> <#-- <w:sz w:val="46"/>-->
<w:sz-cs w:val="46"/> <#-- <w:sz-cs w:val="46"/>-->
</w:rPr> <#-- </w:rPr>-->
<w:t>的规定, 依据特种设备安全技术规范要求,予以</w:t> <#-- <w:t>的规定, 依据特种设备安全技术规范要求,予以</w:t>-->
</w:r> <#-- </w:r>-->
<w:r> <#-- <w:r>-->
<w:rPr> <#-- <w:rPr>-->
<w:spacing w:val="1"/> <#-- <w:spacing w:val="1"/>-->
<w:sz w:val="46"/> <#-- <w:sz w:val="46"/>-->
<w:sz-cs w:val="46"/> <#-- <w:sz-cs w:val="46"/>-->
</w:rPr> <#-- </w:rPr>-->
<w:t>使用登记。</w:t> <#-- <w:t>使用登记。</w:t>-->
</w:r> <#-- </w:r>-->
</w:p> </w:p>
<w:p> <w:p>
<w:pPr> <w:pPr>
...@@ -624,7 +624,7 @@ ...@@ -624,7 +624,7 @@
<w:sz w:val="24"/> <w:sz w:val="24"/>
</w:rPr> </w:rPr>
<w:pict> <w:pict>
<v:shape id="文本框 15" o:spid="_x0000_s1029" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:-25.65pt;margin-top:686pt;height:44.05pt;width:461.2pt;z-index:251667456;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600"> <v:shape id="文本框 15" o:spid="_x0000_s1029" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:-25.65pt;margin-top:670pt;height:50pt;width:461.2pt;z-index:251667456;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600">
<v:path/> <v:path/>
<v:fill on="t" color2="#FFFFFF" focussize="0,0"/> <v:fill on="t" color2="#FFFFFF" focussize="0,0"/>
<v:stroke on="f" weight="0.5pt"/> <v:stroke on="f" weight="0.5pt"/>
...@@ -662,16 +662,16 @@ ...@@ -662,16 +662,16 @@
<w:sz w:val="28"/> <w:sz w:val="28"/>
<w:sz-cs w:val="28"/> <w:sz-cs w:val="28"/>
</w:rPr> </w:rPr>
<w:t>依据安全技术规范的要求,应当在定期检验确定的有效期和技术参数范围</w:t> <w:t>依据安全技术规范的要求,应当在定期检验确定的有效期和技术参数范围内使用。</w:t>
</w:r>
<w:r>
<w:rPr>
<w:spacing w:val="-12"/>
<w:sz w:val="28"/>
<w:sz-cs w:val="28"/>
</w:rPr>
<w:t>内使用。</w:t>
</w:r> </w:r>
<#-- <w:r>-->
<#-- <w:rPr>-->
<#-- <w:spacing w:val="-12"/>-->
<#-- <w:sz w:val="28"/>-->
<#-- <w:sz-cs w:val="28"/>-->
<#-- </w:rPr>-->
<#-- <w:t>内使用。</w:t>-->
<#-- </w:r>-->
</w:p> </w:p>
<w:p> <w:p>
<w:pPr> <w:pPr>
......
...@@ -27,12 +27,16 @@ public class JyjcInspectionApplicationModel extends BaseModel { ...@@ -27,12 +27,16 @@ public class JyjcInspectionApplicationModel extends BaseModel {
@ApiModelProperty(value = "检验检测单位编码") @ApiModelProperty(value = "检验检测单位编码")
private String inspectionUnitCode; private String inspectionUnitCode;
@ApiModelProperty(value = "检验检测单位名称") @ApiModelProperty(value = "检验检测单位名称")
private String inspectionUnitName; private String inspectionUnitName;
@ApiModelProperty(value = "检验检测类型") @ApiModelProperty(value = "检验检测类型")
private String inspectionType; private String inspectionType;
@ApiModelProperty(value = "检验检测类型名称")
private String inspectionTypeName;
@ApiModelProperty(value = "设备种类") @ApiModelProperty(value = "设备种类")
private String equipClassify; private String equipClassify;
...@@ -75,10 +79,13 @@ public class JyjcInspectionApplicationModel extends BaseModel { ...@@ -75,10 +79,13 @@ public class JyjcInspectionApplicationModel extends BaseModel {
@ApiModelProperty(value = "报检单位编号") @ApiModelProperty(value = "报检单位编号")
private String applicationUnitCode; private String applicationUnitCode;
@ApiModelProperty(value = "报检单位名称") @ApiModelProperty(value = "报检单位名称")
private String applicationUnitName; private String applicationUnitName;
@ApiModelProperty(value = "报检单位地址") @ApiModelProperty(value = "报检单位地址")
private String address; private String address;
@ApiModelProperty(value = "监管单位名称") @ApiModelProperty(value = "监管单位名称")
private String superviseOrgName; private String superviseOrgName;
...@@ -140,14 +147,14 @@ public class JyjcInspectionApplicationModel extends BaseModel { ...@@ -140,14 +147,14 @@ public class JyjcInspectionApplicationModel extends BaseModel {
@ApiModelProperty(value = "下一步任务名称") @ApiModelProperty(value = "下一步任务名称")
private String nextTaskName; private String nextTaskName;
@ApiModelProperty(value = "设备分类") @ApiModelProperty(value = "设备分类")
private String equList; private String equList;
@ApiModelProperty(value = "监管码") @ApiModelProperty(value = "监管码")
private String supervisoryCode; private String supervisoryCode;
private String instanceId; private String instanceId;
public String getInstanceId() { public String getInstanceId() {
......
...@@ -87,7 +87,8 @@ public class JyjcOpeningApplicationModel extends BaseModel { ...@@ -87,7 +87,8 @@ public class JyjcOpeningApplicationModel extends BaseModel {
@ApiModelProperty(value = "创建人ID") @ApiModelProperty(value = "创建人ID")
private String createUserId; private String createUserId;
/* ---------------- -------------- */
@ApiModelProperty (value = "企业资质信息") @ApiModelProperty (value = "企业资质信息")
List<TzBaseUnitLicenceDto> baseUnitLicences; List<TzBaseUnitLicenceDto> baseUnitLicences;
......
...@@ -85,7 +85,7 @@ public class JyjcInspectionResultController extends BaseController { ...@@ -85,7 +85,7 @@ public class JyjcInspectionResultController extends BaseController {
/** /**
* 列表全部数据查询 * 列表全部数据查询
* *getJyjcPersonByUnitCode
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -11,11 +11,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -11,11 +11,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sun.org.apache.bcel.internal.generic.NEW;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl; import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...@@ -23,7 +21,6 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService; ...@@ -23,7 +21,6 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.jyjc.api.entity.*; import com.yeejoin.amos.boot.module.jyjc.api.entity.*;
import com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum; import com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum;
import com.yeejoin.amos.boot.module.jyjc.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jyjc.api.enums.DocumentEnum; import com.yeejoin.amos.boot.module.jyjc.api.enums.DocumentEnum;
import com.yeejoin.amos.boot.module.jyjc.api.enums.ResultStatusEnum; import com.yeejoin.amos.boot.module.jyjc.api.enums.ResultStatusEnum;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationEquipMapper; import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationEquipMapper;
...@@ -34,14 +31,15 @@ import com.yeejoin.amos.boot.module.jyjc.biz.feign.JgFeignClient; ...@@ -34,14 +31,15 @@ import com.yeejoin.amos.boot.module.jyjc.biz.feign.JgFeignClient;
import com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient; import com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jyjc.biz.service.TaskModelServiceImpl; import com.yeejoin.amos.boot.module.jyjc.biz.service.TaskModelServiceImpl;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.handler.JyjcInspectionApplicationHandlerFactory; import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.handler.JyjcInspectionApplicationHandlerFactory;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.systemctl.model.TaskV2Model; import com.yeejoin.amos.feign.systemctl.model.TaskV2Model;
import com.yeejoin.amos.feign.workflow.Workflow; import com.yeejoin.amos.feign.workflow.Workflow;
import com.yeejoin.amos.feign.workflow.model.*; import com.yeejoin.amos.feign.workflow.model.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -56,16 +54,10 @@ import org.typroject.tyboot.core.foundation.exception.BaseException; ...@@ -56,16 +54,10 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.parseArray;
import static com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl.buildOrderNo;
/** /**
* 服务实现类 * 服务实现类
* *
...@@ -120,6 +112,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -120,6 +112,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Autowired @Autowired
DataDictionaryServiceImpl dataDictionaryService; DataDictionaryServiceImpl dataDictionaryService;
@Autowired
EquipmentCategoryMapper equipmentCategoryMapper;
public JyjcInspectionApplicationModel save(@RequestBody JSONObject obj) { public JyjcInspectionApplicationModel save(@RequestBody JSONObject obj) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
...@@ -314,7 +309,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -314,7 +309,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments); jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments);
} }
} }
model.setStatus(String.valueOf(FlowStatusEnum.TO_SUBMITTED.getCode())); //6611 对应数据字典 检验流程状态 待受理 //6611 对应数据字典 检验流程状态 待受理
model.setStatus(String.valueOf(FlowStatusEnum.TO_SUBMITTED.getCode()));
ArrayList<String> roleList = new ArrayList<>(); ArrayList<String> roleList = new ArrayList<>();
String taskId = model.getNextTaskId(); String taskId = model.getNextTaskId();
...@@ -356,9 +352,22 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -356,9 +352,22 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
executeOneStep(model, taskName1, nextUserIds); executeOneStep(model, taskName1, nextUserIds);
this.updateWithModel(model); this.updateWithModel(model);
} }
return this.buildRedundancyField(model);
}
private JyjcInspectionApplicationModel buildRedundancyField(JyjcInspectionApplicationModel model) {
// 冗余前端显示检验检测类型名称
if(StringUtils.isNotEmpty(model.getInspectionType())){
model.setInspectionTypeName(getInspectionTypeName(model.getInspectionType()));
}
return model; return model;
} }
private String getInspectionTypeName(String inspectionType){
DataDictionary dictionary = dataDictionaryService.getByCode(inspectionType,"JYJC");
return dictionary != null ? dictionary.getName() : "";
}
@Override @Override
public Boolean deleteBatchData(List<Long> sequenceNbr) { public Boolean deleteBatchData(List<Long> sequenceNbr) {
......
...@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultServic ...@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultServic
import com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils; import com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*; import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -89,6 +90,9 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -89,6 +90,9 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
@Autowired @Autowired
TzBaseEnterpriseInfoMapper tzBaseEnterpriseInfoMapper; TzBaseEnterpriseInfoMapper tzBaseEnterpriseInfoMapper;
@Autowired
CommonserviceImpl commonService;
/** /**
* 检验检测单位分页查询 * 检验检测单位分页查询
*/ */
...@@ -267,7 +271,8 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -267,7 +271,8 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
info.setInspectType(model.getInspectionType()); info.setInspectType(model.getInspectionType());
info.setRecord(model.getEquipUnicode()); info.setRecord(model.getEquipUnicode());
info.setInspectDate(model.getInspectionDate()); info.setInspectDate(model.getInspectionDate());
info.setInspectStaff(model.getInspector()); info.setInspectStaff(getInspectUserName(model));
info.setInspectStaffCode(model.getInspector());
info.setInspectReport(jybgFile.getAttachmentUrl()); info.setInspectReport(jybgFile.getAttachmentUrl());
info.setInspectConclusion(model.getInspectionConclusion()); info.setInspectConclusion(model.getInspectionConclusion());
info.setProblemRemark(model.getNonConformance()); info.setProblemRemark(model.getNonConformance());
...@@ -278,6 +283,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -278,6 +283,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
info.setRecDate(new Date()); info.setRecDate(new Date());
} }
private String getInspectUserName(JyjcInspectionResultModel model) {
List<TzsUserInfo> userInfos = commonService.getUserInfosByUnitCode(model.getInspectionUnitCode());
return userInfos.stream().filter(u->model.getInspector().contains(u.getSequenceNbr() + "")).map(TzsUserInfo::getName).collect(Collectors.joining(","));
}
/** /**
* 列表查询 示例 * 列表查询 示例
*/ */
......
...@@ -115,4 +115,10 @@ public class IdxBizJgInspectionDetectionInfo extends TzsBaseEntity { ...@@ -115,4 +115,10 @@ public class IdxBizJgInspectionDetectionInfo extends TzsBaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String supervisoryCode; private String supervisoryCode;
/**
* 检验人员ids(检验检测业务使用)
*/
@TableField(value ="\"INSPECT_STAFF_CODE\"")
private String inspectStaffCode;
} }
...@@ -104,4 +104,10 @@ public class InspectionDetectionInfo extends AbstractEquipBaseEntity { ...@@ -104,4 +104,10 @@ public class InspectionDetectionInfo extends AbstractEquipBaseEntity {
*/ */
@TableField(value ="\"INSPECT_REPORT_NO\"") @TableField(value ="\"INSPECT_REPORT_NO\"")
private String inspectReportNo; private String inspectReportNo;
/**
* 检验人员ids(检验检测业务使用)
*/
@TableField(value ="\"INSPECT_STAFF_CODE\"")
private String inspectStaffCode;
} }
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