Commit 8181f7e7 authored by 王果's avatar 王果

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 3fb91831 11361ab8
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.workflow.feign; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.workflow.feign;
import java.util.HashMap; import java.util.HashMap;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -9,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -9,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import java.text.ParseException; import java.text.ParseException;
import java.util.Map;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import feign.Response; import feign.Response;
...@@ -227,4 +230,11 @@ public interface WorkflowFeignService { ...@@ -227,4 +230,11 @@ public interface WorkflowFeignService {
@RequestMapping("/task/getTaskNoAuth/{processInstanceId}") @RequestMapping("/task/getTaskNoAuth/{processInstanceId}")
JSONObject getTaskId(@PathVariable String processInstanceId); JSONObject getTaskId(@PathVariable String processInstanceId);
/***
*
* 获取流程审批日志
* */
@RequestMapping(value = "/task/flowLogger/{procInsId}", method = RequestMethod.GET)
FeignClientResult<Map<String,Object>> getFlowLogger(@PathVariable(value = "procInsId") String procInsId);
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<select id="getStatisticsMessage" <select id="getStatisticsMessage"
resultType="java.util.Map"> resultType="java.util.Map">
SELECT mainName as maintenanceUnit, useName as useUnit, ADDRESS as address, unitCode as unitCode, equipmentId SELECT mainName as maintenanceUnit, useName as useUnit, ADDRESS as address, unitCode as unitCode, equipmentId, supervisoryUnitName, supervisoryUnitOrgCode
from ( from (
SELECT use.ADDRESS as address, SELECT use.ADDRESS as address,
tac.equipment_id as equipmentId, tac.equipment_id as equipmentId,
...@@ -16,7 +16,10 @@ ...@@ -16,7 +16,10 @@
ORDER BY INFORM_START LIMIT 1 ORDER BY INFORM_START LIMIT 1
) as mainName, ) as mainName,
use.USE_UNIT_NAME as useName, use.USE_UNIT_NAME as useName,
use.USE_UNIT_CREDIT_CODE as unitCode from tz_alert_called tac use.USE_UNIT_CREDIT_CODE as unitCode,
(SELECT supervise_org_name from tz_base_enterprise_info where use_unit_code = use.USE_UNIT_CREDIT_CODE) as supervisoryUnitName,
(SELECT supervise_org_code from tz_base_enterprise_info where use_unit_code = use.USE_UNIT_CREDIT_CODE) as supervisoryUnitOrgCode
from tz_alert_called tac
LEFT JOIN idx_biz_jg_use_info use on tac.equipment_id = use.RECORD LEFT JOIN idx_biz_jg_use_info use on tac.equipment_id = use.RECORD
WHERE tac.alarm_type_code != '962' WHERE tac.alarm_type_code != '962'
and tac.equipment_id is not null and tac.equipment_id is not null
......
...@@ -11,4 +11,5 @@ public class CylinderFillingMessageModel extends BaseModel { ...@@ -11,4 +11,5 @@ public class CylinderFillingMessageModel extends BaseModel {
private String message; private String message;
private String appId; private String appId;
private String orgCode; private String orgCode;
private String useUnitCode;
} }
...@@ -47,4 +47,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI ...@@ -47,4 +47,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
IPage<TzBaseEnterpriseInfoDto> pageList(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto, List orgCodeList); IPage<TzBaseEnterpriseInfoDto> pageList(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto, List orgCodeList);
List<TzBaseEnterpriseInfoDto> queryByUseCode(@Param("useCodes") List<String> useCode); List<TzBaseEnterpriseInfoDto> queryByUseCode(@Param("useCodes") List<String> useCode);
List<TzBaseEnterpriseInfoDto> queryByAppId(@Param("appIds") List<String> appIds);
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.cylinder.api.dto.CylinderFillingMessageModel; import com.yeejoin.amos.boot.module.cylinder.api.dto.CylinderFillingMessageModel;
import com.yeejoin.amos.boot.module.cylinder.api.dto.PageParam; import com.yeejoin.amos.boot.module.cylinder.api.dto.PageParam;
import com.yeejoin.amos.boot.module.cylinder.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.cylinder.api.mapper.CylinderFillingMessageMapper; import com.yeejoin.amos.boot.module.cylinder.api.mapper.CylinderFillingMessageMapper;
import com.yeejoin.amos.boot.module.cylinder.api.entity.CylinderFillingMessageEntity; import com.yeejoin.amos.boot.module.cylinder.api.entity.CylinderFillingMessageEntity;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
...@@ -11,6 +12,7 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel; ...@@ -11,6 +12,7 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import joptsimple.internal.Strings; import joptsimple.internal.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...@@ -24,15 +26,26 @@ import java.util.stream.Collectors; ...@@ -24,15 +26,26 @@ import java.util.stream.Collectors;
@Component @Component
public class CylinderFillingMessageService extends BaseService<CylinderFillingMessageModel, CylinderFillingMessageEntity, CylinderFillingMessageMapper> { public class CylinderFillingMessageService extends BaseService<CylinderFillingMessageModel, CylinderFillingMessageEntity, CylinderFillingMessageMapper> {
@Autowired
ITzBaseEnterpriseInfoService iTzBaseEnterpriseInfoService;
public IPage<CylinderFillingMessageModel> getUploadCylinderLogs(PageParam pageParam, String regionCode) { public IPage<CylinderFillingMessageModel> getUploadCylinderLogs(PageParam pageParam, String regionCode) {
CompanyModel result = Privilege.companyClient.queryByCompanyCode(regionCode).getResult(); CompanyModel result = Privilege.companyClient.queryByCompanyCode(regionCode).getResult();
Page<CylinderFillingMessageModel> page = new Page<>(pageParam.getCurrent(), pageParam.getSize()); Page<CylinderFillingMessageModel> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
return getUploadCylinderLogsByOrgCode(page, result.getOrgCode()); IPage<CylinderFillingMessageModel> uploadCylinderLogsByOrgCode = getUploadCylinderLogsByOrgCode(page, result.getOrgCode());
List<String> appIds = uploadCylinderLogsByOrgCode.getRecords().stream().map(CylinderFillingMessageModel::getAppId).collect(Collectors.toList()).stream().filter(x -> !ValidationUtil.isEmpty(x)).distinct().collect(Collectors.toList());
List<TzBaseEnterpriseInfoDto> tzBaseEnterpriseInfoDtos = iTzBaseEnterpriseInfoService.queryByAppId(appIds);
if (!ValidationUtil.isEmpty(tzBaseEnterpriseInfoDtos)){
Map<String, String> map = tzBaseEnterpriseInfoDtos.stream().collect(Collectors.toMap(TzBaseEnterpriseInfoDto::getAppId, TzBaseEnterpriseInfoDto::getUseUnitCode));
uploadCylinderLogsByOrgCode.getRecords().stream().forEach(x -> {
x.setUseUnitCode(map.get(x.getAppId()));
});
}
return page;
} }
public IPage<CylinderFillingMessageModel> getUploadCylinderLogsByOrgCode( Page<CylinderFillingMessageModel> page, @Condition(Operator.likeRight) String orgCode) { public IPage<CylinderFillingMessageModel> getUploadCylinderLogsByOrgCode(Page<CylinderFillingMessageModel> page, @Condition(Operator.likeRight) String orgCode) {
return queryForPage(page, null, false, orgCode); return queryForPage(page, null, false, orgCode);
} }
} }
...@@ -46,4 +46,6 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI ...@@ -46,4 +46,6 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
String setLabel(List<Long> enterpriseIds, List<String> enterpriseLabels); String setLabel(List<Long> enterpriseIds, List<String> enterpriseLabels);
List<TzBaseEnterpriseInfoDto> queryByUseCode(List<String> useCode); List<TzBaseEnterpriseInfoDto> queryByUseCode(List<String> useCode);
List<TzBaseEnterpriseInfoDto> queryByAppId(List<String> appIds);
} }
...@@ -164,4 +164,13 @@ ...@@ -164,4 +164,13 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<select id="queryByAppId" resultType="com.yeejoin.amos.boot.module.cylinder.api.dto.TzBaseEnterpriseInfoDto">
select * from tz_base_enterprise_info where app_id in
<if test="appIds != null">
<foreach collection="appIds" item="appId" open="(" close=")" separator=",">
#{appId}
</foreach>
</if>
</select>
</mapper> </mapper>
...@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.cylinder.biz.service.impl; ...@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.cylinder.biz.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -514,6 +515,12 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -514,6 +515,12 @@ public class TzBaseEnterpriseInfoServiceImpl
return this.baseMapper.queryByUseCode(useCode); return this.baseMapper.queryByUseCode(useCode);
} }
@Override
@DS("tzs")
public List<TzBaseEnterpriseInfoDto> queryByAppId(@Condition(Operator.in) List<String> appId) {
return this.baseMapper.queryByAppId(appId);
}
private String checkLabel(List<String> enterpriseLabels, String result) { private String checkLabel(List<String> enterpriseLabels, String result) {
List<String> strings = Arrays.asList(result.split(",")); List<String> strings = Arrays.asList(result.split(","));
ArrayList<String> res = new ArrayList<>(strings); ArrayList<String> res = new ArrayList<>(strings);
......
...@@ -641,6 +641,7 @@ ...@@ -641,6 +641,7 @@
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany, T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.install_start_date AS constructionDate T.install_start_date AS constructionDate
FROM FROM
tzs_jg_installation_notice T tzs_jg_installation_notice T
...@@ -651,6 +652,7 @@ ...@@ -651,6 +652,7 @@
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany, T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate T.plan_date AS constructionDate
FROM FROM
tzs_jg_maintain_notice T tzs_jg_maintain_notice T
...@@ -661,6 +663,7 @@ ...@@ -661,6 +663,7 @@
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany, T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate T.plan_date AS constructionDate
FROM FROM
tzs_jg_reform_notice T tzs_jg_reform_notice T
...@@ -671,6 +674,7 @@ ...@@ -671,6 +674,7 @@
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
T.use_unit_name AS useCompany, T.use_unit_name AS useCompany,
T.use_unit_credit_code AS useUnitCode,
T.plan_date AS constructionDate T.plan_date AS constructionDate
FROM FROM
tzs_jg_transfer_notice T tzs_jg_transfer_notice T
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<if test="dto.equListCode != null and dto.equListCode != ''"> <if test="dto.equListCode != null and dto.equListCode != ''">
and tjurm.equ_list_code = #{dto.equListCode} and tjurm.equ_list_code = #{dto.equListCode}
</if> </if>
<if test="dto.equCategoryCode != null and dto.equCategoryCode != '' and dto.isCyl != 1 "> <if test="dto.equCategoryCode != null and dto.equCategoryCode != ''">
and tjurm.equ_category_code = #{dto.equCategoryCode} and tjurm.equ_category_code = #{dto.equCategoryCode}
</if> </if>
<if test="dto.equDefineCode != null and dto.equDefineCode != ''"> <if test="dto.equDefineCode != null and dto.equDefineCode != ''">
...@@ -60,6 +60,9 @@ ...@@ -60,6 +60,9 @@
and tjurm.certificate_status = #{dto.certificateStatus} and tjurm.certificate_status = #{dto.certificateStatus}
</if> </if>
<if test="dto.isCyl != null and dto.isCyl == 1 "> <if test="dto.isCyl != null and dto.isCyl == 1 ">
AND tjurm.reg_type != '车用气瓶登记'
</if>
<if test="dto.whetherVehicleCylinder != null and dto.whetherVehicleCylinder == 1 ">
AND tjurm.reg_type = '车用气瓶登记' AND tjurm.reg_type = '车用气瓶登记'
</if> </if>
ORDER BY tjurm.rec_date DESC ORDER BY tjurm.rec_date DESC
......
...@@ -1416,6 +1416,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1416,6 +1416,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]); map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]);
map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]); map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]);
map.put("USC_UNIT_CREDIT_CODE", companyCode);
this.setRepeatUsedCheckFilterParam(boolMust, companyCode, "renovationNoticeNew"); this.setRepeatUsedCheckFilterParam(boolMust, companyCode, "renovationNoticeNew");
} else if (ValidationUtil.equals(queryType, "GZ_WX")) {// 维修告知设备选择 - 业务限制 } else if (ValidationUtil.equals(queryType, "GZ_WX")) {// 维修告知设备选择 - 业务限制
// 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、选择的区县(USE_PLACE_CODE)过滤数据 // 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、选择的区县(USE_PLACE_CODE)过滤数据
...@@ -1424,6 +1425,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1424,6 +1425,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]); map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]);
map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]); map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]);
map.put("USC_UNIT_CREDIT_CODE", companyCode);
this.setRepeatUsedCheckFilterParam(boolMust, companyCode, "maintainNotice"); this.setRepeatUsedCheckFilterParam(boolMust, companyCode, "maintainNotice");
} else if (ValidationUtil.equals(queryType, "GZ_YZ")) {// 移装告知设备选择 - 业务限制 } else if (ValidationUtil.equals(queryType, "GZ_YZ")) {// 移装告知设备选择 - 业务限制
// 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、(区内移装(transferType=区内移装)根据区县(USE_PLACE_CODE))过滤数据 // 设备类别(EQU_CATEGORY)、安装单位(USC_UNIT_CREDIT_CODE)、选择的使用单位(USE_UNIT_CREDIT_CODE)、(区内移装(transferType=区内移装)根据区县(USE_PLACE_CODE))过滤数据
...@@ -1438,6 +1440,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1438,6 +1440,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
} }
map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]); map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]);
map.put("USC_UNIT_CREDIT_CODE", companyCode);
this.setRepeatUsedCheckFilterParam(boolMust, companyCode, "transferNotice"); this.setRepeatUsedCheckFilterParam(boolMust, companyCode, "transferNotice");
} }
} }
......
...@@ -492,6 +492,8 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh ...@@ -492,6 +492,8 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
// 修改证管理信息 // 修改证管理信息
manage.setUseUnitName(jgChangeVehicleRegistrationUnit.getNewUseUnitName()); manage.setUseUnitName(jgChangeVehicleRegistrationUnit.getNewUseUnitName());
manage.setUseUnitCreditCode(jgChangeVehicleRegistrationUnit.getNewUseUnitCreditCode()); manage.setUseUnitCreditCode(jgChangeVehicleRegistrationUnit.getNewUseUnitCreditCode());
manage.setReceiveCompanyCode(jgChangeVehicleRegistrationUnit.getReceiveOrgCode());
manage.setReceiveOrgName(jgChangeVehicleRegistrationUnit.getReceiveOrgName());
manage.setAuditPassDate(new Date()); manage.setAuditPassDate(new Date());
jgUseRegistrationManageService.updateById(manage); jgUseRegistrationManageService.updateById(manage);
// 保存证流水信息 // 保存证流水信息
......
...@@ -306,6 +306,9 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr ...@@ -306,6 +306,9 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
* 列表查询 * 列表查询
*/ */
public List<JgUseRegistrationManageDto> queryByUseUnitCreditCode(JgUseRegistrationManageDto dto) { public List<JgUseRegistrationManageDto> queryByUseUnitCreditCode(JgUseRegistrationManageDto dto) {
if("1".equals(dto.getWhetherVehicleCylinder())){
dto.setEquCategoryCode(CylinderTypeEnum.CYLINDER.getCode());
}
return jgUseRegistrationManageMapper.queryByUseUnitCreditCode(dto); return jgUseRegistrationManageMapper.queryByUseUnitCreditCode(dto);
} }
......
...@@ -1453,7 +1453,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1453,7 +1453,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 600000) @GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 6000000)
public void flowExecute(Long id, String instanceId, String operate, String comment, String carNumber, String manageType, String nextTaskId, JSONObject jsonObject) { public void flowExecute(Long id, String instanceId, String operate, String comment, String carNumber, String manageType, String nextTaskId, JSONObject jsonObject) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId); String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey); RLock lock = redissonClient.getLock(lockKey);
...@@ -2608,7 +2608,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2608,7 +2608,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public List<Map<String, Object>> handleHistoryEquip(JSONObject map) { public List<Map<String, Object>> handleHistoryEquip(JSONObject map) {
try { try {
// 使用登记证编号 // 使用登记证编号
String useRegistrationCode = String.valueOf(map.get("useRegistrationCode")).trim(); String useRegistrationCode = String.valueOf(map.get("useOrgCode")).trim();
//校验使用登记证编号的唯一性 //校验使用登记证编号的唯一性
Boolean used = commonServiceImpl.useRegistrationCertificateAccountUnique(useRegistrationCode); Boolean used = commonServiceImpl.useRegistrationCertificateAccountUnique(useRegistrationCode);
if (used){ if (used){
......
...@@ -21,6 +21,11 @@ public class PublicityInspectOrgInfoDto { ...@@ -21,6 +21,11 @@ public class PublicityInspectOrgInfoDto {
private String unitCode; private String unitCode;
/** /**
* 单位编码
*/
private String useUnitCode;
/**
* 核准代码 * 核准代码
*/ */
private String approvalNumber; private String approvalNumber;
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
l.cert_no as approvalNumber, l.cert_no as approvalNumber,
l.expiry_date as aapprovalDeadline, l.expiry_date as aapprovalDeadline,
b.use_code as unitCode, b.use_code as unitCode,
b.use_code as useUnitCode,
a.expiry_date as businessDeadline, a.expiry_date as businessDeadline,
a.licenceType a.licenceType
from from
......
...@@ -134,6 +134,24 @@ public class JyjcInspectionApplicationController extends BaseController { ...@@ -134,6 +134,24 @@ public class JyjcInspectionApplicationController extends BaseController {
return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.selectBySeq(sequenceNbr, getSelectedOrgInfo().getCompany().getCompanyType())); return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.selectBySeq(sequenceNbr, getSelectedOrgInfo().getCompany().getCompanyType()));
} }
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/selectOneForBigScreen/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
public ResponseModel<Map<String, Object>> selectOneForBigScreen(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.selectOneForBigScreen(sequenceNbr, getSelectedOrgInfo().getCompany().getCompanyType()));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/selectOneForBigScreenEqu/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
public ResponseModel<Map<String, Object>> selectOneForBigScreenEqu(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.selectOneForBigScreenEqu(sequenceNbr, getSelectedOrgInfo().getCompany().getCompanyType()));
}
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/pageList") @PostMapping(value = "/pageList")
......
...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService; ...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory; import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
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.common.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
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.*; import com.yeejoin.amos.boot.module.jyjc.api.enums.*;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper; import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper;
...@@ -45,6 +46,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO; ...@@ -45,6 +46,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO; import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import com.yeejoin.amos.feign.workflow.model.TaskResultDTO; import com.yeejoin.amos.feign.workflow.model.TaskResultDTO;
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.apache.lucene.queryparser.classic.QueryParser; import org.apache.lucene.queryparser.classic.QueryParser;
...@@ -74,10 +76,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest; ...@@ -74,10 +76,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.parseArray;
/** /**
* 服务实现类 * 服务实现类
...@@ -129,6 +134,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -129,6 +134,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Value("classpath:/json/bizTypeInfo.json") @Value("classpath:/json/bizTypeInfo.json")
private Resource bizTypeInfo; private Resource bizTypeInfo;
@Value("classpath:/json/bigScreenDetail.json")
private Resource bigScreenDetail;
@Autowired @Autowired
private JyjcInspectionApplicationEquipMapper jyjcInspectionApplicationEquipMapper; private JyjcInspectionApplicationEquipMapper jyjcInspectionApplicationEquipMapper;
...@@ -572,6 +579,69 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -572,6 +579,69 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
this.setPlanData(sequenceNbr, map); this.setPlanData(sequenceNbr, map);
return map; return map;
} }
public Map<String, Object> selectOneForBigScreen(Long sequenceNbr, String companyType) {
JyjcInspectionApplicationModel model = this.getBaseMapper().selectDataBySeq(sequenceNbr);
Map<String, Object> map = BeanUtil.beanToMap(model);
// 附件
Map<String, Object> attMap = getAttachmentMap(sequenceNbr);
// 设备
List<Map<String, Object>> arrayList = getEquipInfoList(sequenceNbr);
map.put("equip", arrayList);
map.putAll(attMap);
map.put("companyType", companyType);
this.setPlanData(sequenceNbr, map);
Map<String,Object> resultMap = new HashMap<>();
Map<String, Object> workflowResult = workflowFeignService.getFlowLogger(model.getProcessInstanceId()).getResult();
ArrayList<Map<String, Object>> flowLogger = (ArrayList) workflowResult.get("flowLogger");
ArrayList<Map<String, Object>> records = new ArrayList<>();
List<FormValue> jsonData = getJsonData(bigScreenDetail);
jsonData.forEach(f -> {
Object o = map.get(f.getKey());
if (!ObjectUtils.isEmpty(o)) {
f.setValue(o.toString());
}
});
if(!CollectionUtils.isEmpty(flowLogger)){
for(int i = flowLogger.size()-1;i>=0;i--){
HashMap<String, Object> data = new HashMap<>();
data.put("label", flowLogger.get(i).get("approvalStatue"));
data.put("operatingTime", flowLogger.get(i).get("operateDate"));
if(null != flowLogger.get(i).get("assignee")) {
data.put("operater", ((Map<String, Object>) flowLogger.get(i).get("assignee")).get("orgNamesWithoutRole") + ":" + flowLogger.get(i).get("taskName"));
}else if(null != flowLogger.get(i).get("companyName")){
data.put("operater", flowLogger.get(i).get("companyName") + ":" + flowLogger.get(i).get("taskName"));
}
records.add(data);
}
}
HashMap<String, Object> datas = new HashMap<>();
datas.put("datas", records);
datas.put("title", "审批进度");
datas.put("renderType", "timeline");
resultMap.put("infoRecords", datas);
resultMap.put("keyParams", jsonData);
return resultMap;
}
public Map<String, Object> selectOneForBigScreenEqu(Long sequenceNbr, String companyType) {
// 设备
List<Map<String, Object>> arrayList = getEquipInfoList(sequenceNbr);
Map<String,Object> resultMap = new HashMap<>();
resultMap.put("records", arrayList);
return resultMap;
}
private List<FormValue> getJsonData(Resource resource) {
String json;
try {
json = IOUtils.toString(resource.getInputStream(), String.valueOf(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new RuntimeException(e);
}
return parseArray(json, FormValue.class);
}
private List<Map<String, Object>> getEquipInfoList(Long sequenceNbr) { private List<Map<String, Object>> getEquipInfoList(Long sequenceNbr) {
Iterable<ESEquipmentCategoryDto> equips = getEsEquipmentCategoryDtos(sequenceNbr); Iterable<ESEquipmentCategoryDto> equips = getEsEquipmentCategoryDtos(sequenceNbr);
......
[
{ "key": "applicationNo", "label": "报检单号" , "type": "text"},
{ "key": "applicationDate", "label": "报检日期" , "type": "text"},
{ "key": "inspectionType", "label": "检验类型" , "type": "text"},
{ "key": "applicationUnitName", "label": "申报单位名称" , "type": "text"},
{ "key": "applicationUnitCode", "label": "单位统一信用代码" , "type": "text"},
{ "key": "address", "label": "单位地址" , "type": "text"},
{ "key": "superviseOrgName", "label": "监管单位名称" , "type": "text"},
{ "key": "applicationContactName", "label": "单位联系人" , "type": "text"},
{ "key": "applicationContactPhone", "label": "联系电话" , "type": "text"},
{ "key": "inspectionUnitName", "label": "检验机构名称" , "type": "text"},
{ "key": "applicationRemark", "label": "备注" , "type": "text"}
]
\ No newline at end of file
...@@ -39,7 +39,9 @@ public class DPSubController { ...@@ -39,7 +39,9 @@ public class DPSubController {
public ResponseModel<JSONObject> commonQuery(@PathVariable String template, @RequestBody Map<String, Object> param) { public ResponseModel<JSONObject> commonQuery(@PathVariable String template, @RequestBody Map<String, Object> param) {
if (template.equals("company")) { // 企业 if (template.equals("company")) { // 企业
Assert.notNull(param.get("useUnitCode"), "企业统一信用代码不能为空"); Assert.notNull(param.get("useUnitCode"), "企业统一信用代码不能为空");
} else if (template.equals("equip")) { // 设备 } else if (template.equals("reportEqu")) { // 监督检验
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else if (template.equals("equip")) { //设备
if (ValidationUtil.isEmpty(param.get("record"))){ if (ValidationUtil.isEmpty(param.get("record"))){
param.put("record", param.get("SEQUENCE_NBR")); param.put("record", param.get("SEQUENCE_NBR"));
} }
...@@ -66,6 +68,8 @@ public class DPSubController { ...@@ -66,6 +68,8 @@ public class DPSubController {
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空"); Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else if(template.equals("registration")) { // 登记证 } else if(template.equals("registration")) { // 登记证
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空"); Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else if(template.equals("inspection")) { // 报检
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else { } else {
throw new RuntimeException("暂无模板"); throw new RuntimeException("暂无模板");
} }
......
{
"name": "报检模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jyjc/jyjc-inspection-application/selectOneForBigScreen/{sequenceNbr}"
}
}
},
{
"key": "devtable",
"displayName": "报检设备",
"renderType": "table",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jyjc/jyjc-inspection-application/selectOneForBigScreenEqu/{sequenceNbr}",
"params": {
"current": 1,
"size": 10,
"sequenceNbr": "{sequenceNbr}"
}
}
},
"visualParams": {
"rowKey": "SEQUENCE_NBR",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 150,"align": "left","title": "设备类别","key": "1"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 200,"align": "left","title": "设备品种","key": "2"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 300,"align": "left","title": "设备名称","key": "3"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 200,"align": "left","title": "设备出厂编号","key": "4"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_INNER_CODE","width": 200,"align": "left","title": "单位内部编号","key": "5"},
{"dataRenderingMode": "defaultText","dataIndex": "ADDRESS","width": 300,"align": "left","title": "设备地址","key": "6"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 300,"align": "left","title": "设备代码","key": "7"},
{"dataRenderingMode": "defaultText","dataIndex": "SUPERVISORY_CODE","width": 300,"align": "left","title": "监管码","key": "8"},
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
}
],
"content": {
}
}
\ No newline at end of file
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