Commit aba59b47 authored by tianbo's avatar tianbo

Merge remote-tracking branch 'origin/develop_tzs_main' into develop_tzs_test

parents 4bee1480 dfe47b76
......@@ -57,7 +57,7 @@ public class TmCylinderFillingCheckService extends MyBaseServiceImpl<TmCylinderF
entity -> new MultiFieldKey(entity.getAppId(), entity.getSequenceCode(), entity.getFillingBeforeId()),
"appId",
"sequenceCode",
"fillBeforeId");
"fillingBeforeId");
}
private void syncCylinderFillingAfter(List<TmCylinderFillingCheckModel> model) {
......
......@@ -66,7 +66,7 @@ public class TmCylinderFillingRecordService extends MyBaseServiceImpl<TmCylinder
entity -> new MultiFieldKey(entity.getAppId(), entity.getSequenceCode(), entity.getFillingBeforeId()),
"appId",
"sequenceCode",
"fillingRecordId"
"fillingBeforeId"
);
}
......
......@@ -28,6 +28,10 @@ public interface JgUseRegistrationManageMapper extends BaseMapper<JgUseRegistrat
@Param("dto") JgUseRegistrationManageDto dto,
@Param("sort") SortVo sortMap);
Page<JgUseRegistrationManageDto> queryForUnitChangePage(@Param("page") Page<JgUseRegistrationManageDto> page,
@Param("dto") JgUseRegistrationManageDto dto,
@Param("sort") SortVo sortMap);
Page<JgUseRegistrationManageDto> queryForPageForJG(@Param("page") Page<JgUseRegistrationManageDto> page,
@Param("dto") JgUseRegistrationManageDto dto,
@Param("sort") SortVo sortMap, @Param("orgCode") String orgCode);
......
......@@ -82,6 +82,85 @@
</select>
<select id="queryForPage" resultType="com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto">
<include refid="page_list"/>
FROM tzs_jg_use_registration_manage tjurm
<where>
tjurm.is_delete = 0
<if test="dto.equList != null and dto.equList != ''">
and tjurm.equ_list = #{dto.equList}
</if>
<if test="dto.equListCode != null and dto.equListCode != ''">
and tjurm.equ_list_code = #{dto.equListCode}
</if>
<if test="dto.equCategory != null and dto.equCategory != ''">
and tjurm.equ_category = #{dto.equCategory}
</if>
<if test="dto.equCategoryCode != null and dto.equCategoryCode != ''">
and tjurm.equ_category_code = #{dto.equCategoryCode}
</if>
<if test="dto.equDefine != null and dto.equDefine != ''">
and tjurm.equ_define = #{dto.equDefine}
</if>
<if test="dto.equDefineCode != null and dto.equDefineCode != ''">
and tjurm.equ_define_code = #{dto.equDefineCode}
</if>
<if test="dto.useRegistrationCode != null and dto.useRegistrationCode != ''">
and tjurm.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
</if>
<if test="dto.applyNo != null and dto.applyNo != ''">
and tjurm.apply_no like concat('%',#{dto.applyNo},'%')
</if>
<if test="dto.certificateNo != null and dto.certificateNo != ''">
and tjurm.certificate_no = #{dto.certificateNo}
</if>
<if test="dto.auditPassDate != null and dto.auditPassDate != ''">
and tjurm.audit_pass_date like concat('%',DATE_FORMAT(#{dto.auditPassDate},'%Y-%m-%d'),'%')
</if>
<if test="dto.certificateStatus != null and dto.certificateStatus != ''">
and tjurm.certificate_status = #{dto.certificateStatus}
</if>
<if test="dto.useUnitCreditCodeForSearch != null and dto.useUnitCreditCodeForSearch != ''">
and tjurm.use_unit_credit_code = #{dto.useUnitCreditCodeForSearch}
</if>
<if test="dto.useUnitCreditNameForSearch != null and dto.useUnitCreditNameForSearch != ''">
and tjurm.use_unit_name like concat ('%',#{dto.useUnitCreditNameForSearch},'%')
</if>
<if test="dto.receiveCompanyCode != null and dto.receiveCompanyCode != ''">
and (tjurm.receive_company_code = #{dto.receiveCompanyCode}
or tjurm.receive_company_code is null or tjurm.receive_company_code = '')
</if>
<if test="dto.dataType == 'company' ">
AND tjurm.use_unit_credit_code = #{dto.useUnitCreditCode}
</if>
<if test="dto.dataType == 'supervision' ">
AND tjurm.receive_company_code = #{dto.receiveCompanyCode}
</if>
<if test="dto.whetherVehicleCylinder != null and dto.whetherVehicleCylinder == 1 ">
AND tjurm.reg_type = '车用气瓶登记'
</if>
<if test="dto.isScrap != null and dto.isScrap != ''">
and tjurm.is_scrap = #{dto.isScrap}
</if>
<if test="dto.isDoBusiness != null and dto.isDoBusiness != ''">
and tjurm.is_do_business = #{dto.isDoBusiness}
</if>
<if test="dto.cityName != null and dto.cityName != ''">
and tjurm.equ_use_address LIKE CONCAT('%', #{dto.cityName}, '%')
</if>
<if test="dto.carNumber != null and dto.carNumber != ''">
and tjurm.car_number LIKE CONCAT('%', #{dto.carNumber}, '%')
</if>
<if test="dto.certInBusinessFlag != null and dto.certInBusinessFlag != '' and dto.certInBusinessFlag == 'false'">
and NOT EXISTS ( <include refid="useRegCertInBusiness"/> )
</if>
ORDER BY
<if test="sort != null">
tjurm.${sort.field} ${sort.sortType},
</if>
tjurm.create_date DESC
</where>
</select>
<select id="queryForUnitChangePage" resultType="com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto">
<include refid="page_list"/>
,estate.sequence_nbr AS estateUnitName
FROM tzs_jg_use_registration_manage tjurm
LEFT JOIN (
......
......@@ -341,7 +341,7 @@ public class JgUseRegistrationManageController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/unitChange/page")
@ApiOperation(httpMethod = "GET", value = "单位变更分页查询", notes = "单位变更分页查询")
@ApiOperation(httpMethod = "GET", value = "单位变更分页查询-带产权单位", notes = "单位变更分页查询-带产权单位")
@FieldMapping({@FieldMapping.FieldMap(sourceField = "useUnitSeq", targetField = "originalUseUnitCreditCode", serviceClass = CommonServiceImpl.class, queryMethod = "queryUnitCreditInfoBySeq")})
public ResponseModel<Page<JgUseRegistrationManageDto>> queryForUnitChangePage(JgUseRegistrationManageDto dto,
@RequestParam(value = "sort", required = false) String sort,
......@@ -361,7 +361,7 @@ public class JgUseRegistrationManageController extends BaseController {
return ResponseHelper.buildResponse(page);
}
dto.setIsDoBusiness("1");
return ResponseHelper.buildResponse(jgUseRegistrationManageServiceImpl.queryForJgUseRegistrationManagePage(page, dto, sort));
return ResponseHelper.buildResponse(jgUseRegistrationManageServiceImpl.queryForUnitChangePage(page, dto, sort));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.dto.IBaseChangeData;
import com.yeejoin.amos.boot.module.jg.api.common.PipLenCalUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.IdxBizJgPipelineOperationHist;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
......@@ -36,7 +37,6 @@ import com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.RegionCodeTypeHandle
import com.yeejoin.amos.boot.module.jg.biz.edit.utils.DiffUtils;
import com.yeejoin.amos.boot.module.jg.biz.service.*;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.*;
import com.yeejoin.amos.boot.module.jg.api.common.PipLenCalUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
......@@ -786,7 +786,6 @@ public class CommonEquipDataProcessService {
return changeData;
}
public Map<String, Object> getEquipDetailByRecord(String record) {
Map<String, Object> re = new HashMap<>();
IdxBizJgRegisterInfo registerInfo = jgUseRegistrationService.getIdxBizJgRegisterInfoService().getOne(new LambdaQueryWrapper<IdxBizJgRegisterInfo>().eq(IdxBizJgRegisterInfo::getRecord, record));
......@@ -834,6 +833,8 @@ public class CommonEquipDataProcessService {
result.put("receiveCompanyCode", jgUseRegistrationManage.getReceiveCompanyCode());
}
}
// 返回当前登录人单位类型(企业还是监管、审批)
result.put("loginUnitType", commonService.getSelectedOrgInfo().getCompany().getLevel());
// 返回是否做过除历史登记外的其他业务
result.put("inOtherBusiness", !jgUseRegistrationService.getJgUseRegistrationMapper().selectListForSelfDiscard(Lists.newArrayList(record)).isEmpty());
result.replaceAll((key, value) -> "null".equals(value) ? null : value);
......
......@@ -714,7 +714,7 @@ public class CommonServiceImpl implements ICommonService {
/**
* 用户选择信心redis获取
**/
protected ReginParams getSelectedOrgInfo() {
public ReginParams getSelectedOrgInfo() {
return JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
}
......
......@@ -1965,7 +1965,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
StringBuilder businessBuilder = new StringBuilder(business);
if (!ObjectUtils.isEmpty(useRegistrationCode)) {
List<JgUseRegistrationManage> regs = jgUseRegistrationManageService.lambdaQuery()
.select(JgUseRegistrationManage::getReceiveOrgName,
.select(JgUseRegistrationManage::getSequenceNbr,
JgUseRegistrationManage::getReceiveOrgName,
JgUseRegistrationManage::getReceiveCompanyCode)
.eq(JgUseRegistrationManage::getUseRegistrationCode, useRegistrationCode)
.eq(JgUseRegistrationManage::getIsDelete, false)
......@@ -3611,6 +3612,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
IdxBizJgUseInfo useInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgUseInfo.class);
// 设计信息
IdxBizJgDesignInfo designInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgDesignInfo.class);
// 维保信息
IdxBizJgMaintenanceRecordInfo maintenanceInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgMaintenanceRecordInfo.class);
// 制造信息
IdxBizJgFactoryInfo factoryInfo = JSON.parseObject(toJSONString(equipmentInfoForm), IdxBizJgFactoryInfo.class);
// 施工信息
......@@ -3714,6 +3717,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
designInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("DESIGNINFO_SEQ")));
iIdxBizJgDesignInfoService.saveOrUpdateData(designInfo);
if (EquipmentClassifityEnum.DT.getCode().equals(equList)) {
// 维保信息
maintenanceInfo.setRecord(record);
maintenanceInfo.setRecDate(date);
maintenanceInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("MAINTENANCERECORDINFO_SEQ")));
iIdxBizJgMaintenanceRecordInfoService.saveOrUpdateData(maintenanceInfo);
}
// 制造信息
factoryInfo.setRecord(record);
factoryInfo.setRecDate(date);
......
......@@ -335,6 +335,20 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
}
/**
* 单位变更证-查询
*/
public Page<JgUseRegistrationManageDto> queryForUnitChangePage(Page<JgUseRegistrationManageDto> page,
JgUseRegistrationManageDto dto,
String sort) {
SortVo sortMap = commonServiceImpl.sortFieldConversion(sort);
if (ApplicationFormTypeEnum.BF.getBusinessCode().equals(dto.getApplyType()) && (!CylinderTypeEnum.CYLINDER.getCode().equals(dto.getEquCategoryCode()) || dto.getRegType().equals(BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getName()))){
dto.setCertificateStatus(null);
dto.setIsScrap("0");
}
return jgUseRegistrationManageMapper.queryForUnitChangePage(page, dto, sortMap);
}
/**
* 分页查询证管理表-选择证使用,添加产权单位id
*/
public Page<JgUseRegistrationManageDto> queryUseRegistrationManagePage(Page<JgUseRegistrationManageDto> page,
......
......@@ -30,6 +30,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.component.event.RestEventTrigger;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......@@ -383,6 +384,7 @@ public class TzBaseEnterpriseInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/deleteBatch")
@ApiOperation(httpMethod = "DELETE", value = "批量删除企业", notes = "批量删除企业")
@RestEventTrigger(value = "operateLogRestEventHandler")
public ResponseModel<Boolean> deleteBatch(@RequestParam String ids) {
return ResponseHelper.buildResponse(enterpriseManageService.delete(Arrays.asList(ids.split(","))));
}
......@@ -390,6 +392,7 @@ public class TzBaseEnterpriseInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/enableBatch")
@ApiOperation(httpMethod = "PUT", value = "企业启用", notes = "企业启用")
@RestEventTrigger(value = "operateLogRestEventHandler")
public ResponseModel<Boolean> enableBatch(@RequestParam String ids) {
return ResponseHelper.buildResponse(enterpriseManageService.enable(Arrays.asList(ids.split(","))));
}
......@@ -397,6 +400,7 @@ public class TzBaseEnterpriseInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/disableBatch")
@ApiOperation(httpMethod = "PUT", value = "企业停用", notes = "企业停用")
@RestEventTrigger(value = "operateLogRestEventHandler")
public ResponseModel<Boolean> disableBatch(@RequestParam String ids) {
return ResponseHelper.buildResponse(enterpriseManageService.disable(Arrays.asList(ids.split(","))));
}
......
......@@ -191,7 +191,7 @@ public class EnterpriseManageServiceImpl {
}
private void buildDeleteCheckFailureMsg(List<String> useNames, String type) {
String msg = String.format("企业:%s下存在%s,请先删除%s后再操作!", String.join("、", useNames), type, type);
String msg = String.format("企业:%s下存在%s,请先联系企业删除%s后再操作!", String.join("、", useNames), type, type);
throw new BadRequest(msg);
}
......
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