Commit b187e20e authored by chang's avatar chang

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

parents 9359e2ec a447a344
......@@ -180,4 +180,7 @@ public class JgUseRegistrationDto extends BaseDto {
@ApiModelProperty(value = "气瓶类别(0液化石油气瓶、1工业气瓶、2其他)")
private String cylinderCategory;
@ApiModelProperty(value = " 监察处置机构代码")
private String supervisionOrgCode;
}
......@@ -64,4 +64,9 @@ public class TaskMessageDto {
* 下节点任务id
*/
String nextTaskId;
/**
* 登记类型(新增使用登记,历史使用登记,特殊使用登记)
*/
String regType;
}
......@@ -255,4 +255,10 @@ public class JgUseRegistration extends BaseEntity {
*/
@TableField("cylinder_category")
private String cylinderCategory;
/**
* 监察处置机构代码
*/
@TableField("supervision_org_code")
private String supervisionOrgCode;
}
......@@ -19,11 +19,11 @@ public enum WorkFlowStatusEnum {
* 使用登记流程
*/
USE_SUBMIT("使用单位提交", "useSubmit", "使用单位待提交", "一级受理已驳回", "使用单位已撤回"),
USE_RECEIVE("一级受理", "useReceive", "一级待受理", "二级受理已驳回", "一级受理已撤回"),
USE_RECEIVE("一级受理", "useReceive", "一级待受理", "已驳回", "一级受理已撤回"),
USE_SAFETY_CHECK("安全监察受理", "safetyCheck", "安全监察待受理", "二级受理已驳回", "安全监察已撤回"),
USE_PRELIMINARY("二级受理", "usePreliminary", "二级待受理", "三级受理已驳回", "二级受理已撤回"),
USE_REEXAMINE("三级受理", "useReexamine", "三级待受理","",""),
/**
* 维保备案
*/
......
......@@ -77,6 +77,7 @@
ur.receive_company_code,
ur.use_unit_credit_code,
ur.transfer_to_user_ids,
ur.supervision_org_code,
ur.use_address as fullAddress,
ur.cancel_reason as cancelReason,
(select group_concat(re.equ_id) from tzs_jg_use_registration_eq re where ur.sequence_nbr = re.equip_transfer_id) as equipId,
......@@ -186,8 +187,9 @@
AND auditPassDate BETWEEN #{dto.auditPassDateStart} AND #{dto.auditPassDateEnd}
</if>
<if test="dto.dataType == 'supervision' ">
AND (receive_company_code = #{dto.receiveCompanyCode} or transfer_to_user_ids LIKE concat ('%',
#{dto.currentUserId}, '%'))
AND (receive_company_code = #{dto.receiveCompanyCode}
OR transfer_to_user_ids LIKE concat ('%',#{dto.currentUserId}, '%'))
OR supervision_org_code LIKE concat (#{dto.supervisionOrgCode}, '%')
AND status <![CDATA[<>]]> '使用单位待提交'
</if>
<if test="dto.dataType == 'company' ">
......@@ -305,7 +307,8 @@
jri.OTHER_ACCESSORIES_REG as otherAccessoriesReg,
jfi.OTHER_ACCESSORIES_FACT as otherAccessoriesFact,
jfi.FACT_SUPERVISION_INSPECTION_REPORT as factSupervisionInspectionReport,
jfi.BOILER_ENERGY_EFFICIENCY_CERTIFICATE as boilerEnergyEfficiencyCertificate
jfi.BOILER_ENERGY_EFFICIENCY_CERTIFICATE as boilerEnergyEfficiencyCertificate,
jfi.FACTORY_IS_COMPLETE as factoryIsComplete
from idx_biz_jg_register_info jri
LEFT JOIN idx_biz_jg_factory_info jfi on jri.RECORD = jfi.RECORD
where jri.RECORD = #{id}
......@@ -399,7 +402,8 @@
APPRAISAL_DATE as appraisalDate,
DESIGN_DOC as designDoc,
DESIGN_STANDARD as designStandard,
OTHER_ACCESSORIES_DES as otherAccessoriesDes
OTHER_ACCESSORIES_DES as otherAccessoriesDes,
DESIGN_IS_COMPLETE as designIsComplete
from idx_biz_jg_design_info
where RECORD = #{id}
</select>
......
......@@ -120,6 +120,20 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPage(jsonObject));
}
/**
* @author LiuLin
*
* 历史无证设备分页查询接口(ES)
* @param map 参数
* @return 分页信息
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/queryHisNoCertEquipPage")
@ApiOperation(httpMethod = "GET", value = "历史无证设备分页查询接口查询", notes = "历史无证设备分页查询接口查询")
public ResponseModel<Page<JSONObject>> queryHisNoCertEquipPage(@RequestParam Map<String, Object> map) {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryHisNoCertEquipPage(new JSONObject(map)));
}
// /**
// * 查询设备注册列表
// *
......
......@@ -112,6 +112,7 @@ public class JgUseRegistrationController extends BaseController {
} else {
dto.setDataType(BaseController.COMPANY_TYPE_SUPERVISION);
dto.setReceiveCompanyCode(info.getCompany().getCompanyCode());
dto.setSupervisionOrgCode(info.getCompany().getOrgCode());
}
if (dto.getAuditPassDateRange() != null && !dto.getAuditPassDateRange().isEmpty() && !dto.getAuditPassDateRange().equals("[, ]")) {
String dateRangeStr = dto.getAuditPassDateRange();
......@@ -136,7 +137,7 @@ public class JgUseRegistrationController extends BaseController {
Page<Map<String, Object>> list = jgUseRegistrationServiceImpl.getList(dto, sort, page, dto.getRoleIds());
list.getRecords().forEach(x -> {
x.put("companyType", info.getCompany().getCompanyType());
x.put("regType", "1".equals(x.get("regType")) ? "历史登记" : "新增登记");
x.put("regType", "1".equals(x.get("regType")) ? "历史登记": "2".equals(x.get("regType")) ? "特殊历史登记": "新增登记");
});
return ResponseHelper.buildResponse(list);
}
......
......@@ -172,7 +172,7 @@ public class ShCarController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "数据查询,校验是否是三环系统数据", notes = "数据查询,校验是否是三环系统数据")
@GetMapping(value = "/searchForSanHanAllParams")
public ResponseModel<ShCar> searchForSanHan(@ApiParam(name = "使用登记证编号") @RequestParam String useRegistrationCode,
@ApiParam(name = "车牌号") @RequestParam String carNumber,
@ApiParam(name = "车牌号") @RequestParam(value = "carNumber", required = false) String carNumber,
@ApiParam(name = "单位内编号") @RequestParam(value = "USE_INNER_CODE", required = false) String useInnerCode,
@ApiParam(name = "车辆VIN码") @RequestParam String identificationCode) {
if (StringUtils.isEmpty(carNumber) && !StringUtils.isEmpty(useInnerCode)) {
......
......@@ -73,4 +73,6 @@ public interface IIdxBizJgRegisterInfoService {
void inspectionExpirationReminderOnce();
void initEnterpriseLicenseExpirationOnce();
Page<JSONObject> queryHisNoCertEquipPage(JSONObject jsonObject);
}
......@@ -1291,6 +1291,11 @@ public class CommonServiceImpl implements ICommonService {
return jgUseRegistrationServiceImpl.handleUnitHistoryEquip(jsonObject);
case "vehicle":
return jgVehicleInformationService.saveOrUpdateHisData(jsonObject);
case "set_sp"://特殊历史登记
jsonObject.put("regType", "2");
jsonObject.put("businessCode", "DJ_SY");
jsonObject.put("submit", Boolean.TRUE);
return jgUseRegistrationServiceImpl.handleUseRegistration(jsonObject);
default:
return jgUseRegistrationServiceImpl.handleHistoryEquip(jsonObject);
}
......
......@@ -1768,6 +1768,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
@Transactional(rollbackFor = Exception.class)
@GlobalTransactional(rollbackFor = Exception.class)
public List<JgVehicleInformation> saveOrUpdateHisData(JSONObject map) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())) + "", ReginParams.class);
CompanyBo company = reginParams.getCompany();
// 使用登记证编号
String useRegistrationCode = String.valueOf(map.get("useRegistrationCode")).trim();
// 车辆VIN码
......@@ -1795,17 +1797,11 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
})
.orElseThrow(() -> new BadRequest("使用登记证号、车辆VIN码与所选设备不一致,请重新选择设备!"));
// 校验使用登记证编号的唯一性 ====> 20241202 任务ID 32776 将校验前置到了新增历史设备阶段
// Boolean used = commonService.useRegistrationCertificateAccountUnique(useRegistrationCode, equipId);
// if (used){
// throw new BadRequest("使用登记证编号已存在!");
// }
// 检测是否三环系统中的车用气瓶数据 不让三环系统数据通过设备新增方式进来
// this.checkIsSanSystemHanData(map);
//使用登记证编号判断是否使用未来系统生成编号
idxBizJgRegisterInfoService.checkUseRegistrationCode(useRegistrationCode, "vehicle");
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())) + "", ReginParams.class);
JgVehicleInformationDto vehicleInfoDto = JSON.parseObject(JSON.toJSONString(map), JgVehicleInformationDto.class);
List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = idxBizJgInspectionDetectionInfoService.checkInspectionInfo(
......@@ -1825,8 +1821,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.filter(Objects::nonNull)
.min(Date::compareTo)
.orElse(null));
CompanyBo company = reginParams.getCompany();
vehicleInfoDto.setCreateDate(new Date());
vehicleInfoDto.setPromoter(reginParams.getUserModel().getUserId());
......@@ -1844,14 +1838,31 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 【A109】 车用气瓶登记业务 车辆VIN码 校验唯一性
LambdaQueryWrapper<JgVehicleInformation> informationLambdaQueryWrapper = new LambdaQueryWrapper<JgVehicleInformation>()
.select(JgVehicleInformation::getUseUnitCreditCode)
.eq(JgVehicleInformation::getIdentificationCode, vehicleInfoDto.getIdentificationCode())
.eq(JgVehicleInformation::getIsDelete, false)
.ne(JgVehicleInformation::getStatus, "已作废")
.ne(JgVehicleInformation::getStatus, "使用单位待提交")
.ne(!ValidationUtil.isEmpty(vehicleInfoDto.getSequenceNbr()), JgVehicleInformation::getSequenceNbr, vehicleInfoDto.getSequenceNbr());
Integer identificationCodeCount = this.baseMapper.selectCount(informationLambdaQueryWrapper);
if (identificationCodeCount > 0) {
throw new BadRequest("车辆VIN码已存在,请重新输入!");
List<JgVehicleInformation> vehicleInfoVINs = this.baseMapper.selectList(informationLambdaQueryWrapper);
if (!vehicleInfoVINs.isEmpty()) {
String companyCode = company.getCompanyCode();
String errMsg = JSON.toJSONString(vehicleInfoVINs).contains(companyCode) ? "已经发起过相同车辆VIN码的历史登记,不支持重复发起!" : "车辆VIN码已存在,请重新输入!";
throw new BadRequest(errMsg);
}
// 车用气瓶登记业务 使用登记证 校验唯一性
LambdaQueryWrapper<JgVehicleInformation> vehicleInformationLambdaQueryWrapper = new LambdaQueryWrapper<JgVehicleInformation>()
.select(JgVehicleInformation::getUseUnitCreditCode)
.eq(JgVehicleInformation::getUseRegistrationCode, vehicleInfoDto.getUseRegistrationCode())
.eq(JgVehicleInformation::getIsDelete, false)
.ne(JgVehicleInformation::getStatus, "已作废")
.ne(JgVehicleInformation::getStatus, "使用单位待提交")
.ne(!ValidationUtil.isEmpty(vehicleInfoDto.getSequenceNbr()), JgVehicleInformation::getSequenceNbr, vehicleInfoDto.getSequenceNbr());
List<JgVehicleInformation> vehicleInfoUseRegs = this.baseMapper.selectList(vehicleInformationLambdaQueryWrapper);
if (!vehicleInfoUseRegs.isEmpty()) {
String companyCode = company.getCompanyCode();
String errMsg = JSON.toJSONString(vehicleInfoUseRegs).contains(companyCode) ? "已经发起过相同使用登记证号的历史登记,不支持重复发起!" : "车辆VIN码已存在,请重新输入!";
throw new BadRequest(errMsg);
}
// 使用单位信息
......
......@@ -287,7 +287,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
ta.setNextTaskId(model.getNextTaskId());
dto.setModel(ta);
//摘要 按原有规则组装
dto.setTaskContent("来自" + model.getEquList() + "【" + model.getSupervisoryCode() + "】的业务办理,【申请单号:" + model.getApplicationNo() + "】");
dto.setTaskContent(this.buildTaskContent(model));
//申请单号
dto.setTaskCode(model.getApplicationNo());
//业务类型枚举code值
......@@ -303,9 +303,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
taskModelService.deleteTaskModel(model.getSequenceNbr() + "");
this.createdTaskModel(model);
} else {
String taskContent = "来自" + model.getEquList() + "【" + model.getSupervisoryCode() + "】的业务办理,【申请单号:" + model.getApplicationNo() + "】";
taskModelService.updateTaskContentById(MapBuilder.<String, Object>create().put("taskContent", taskContent).put("relationId", model.getSequenceNbr() + "").build());
taskModelService.updateTaskContentById(MapBuilder.<String, Object>create().put("taskContent", this.buildTaskContent((model))).put("relationId", model.getSequenceNbr() + "").build());
}
}
......@@ -418,6 +416,13 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return this.buildRedundancyField(model);
}
private String buildTaskContent(JyjcInspectionApplicationModel model){
return String.format("来自%s%s的业务办理,【申请单号:%s】", model.getEquList(), StringUtils.isNotBlank(model.getSupervisoryCode()) ? "【" + model.getSupervisoryCode() + "】" : "", model.getApplicationNo());
}
private String null2String(Object obj) {
return obj == null ? "" : obj.toString();
}
......@@ -1032,7 +1037,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
dto.setFlowCreateDate(new Date());
dto.setTaskName(model.getNextTaskName());
dto.setFlowCode(model.getNextTaskId());
dto.setTaskContent("来自" + model.getEquList() + "【" + model.getSupervisoryCode() + "】的业务办理,【申请单号:" + model.getApplicationNo() + "】");
dto.setTaskContent(this.buildTaskContent(model));
dto.setTaskCode(model.getApplicationNo());
dto.setTaskType(BizTypeEnum.getNumByCode(model.getBizType()));
dto.setTaskTypeLabel(BizTypeEnum.getNameByCode(model.getBizType()));
......
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