Commit 728d9703 authored by tianyiming's avatar tianyiming

16648 (优化)一码通管理,设备认领补录,监督管理信息页面字段调整

parent 3fb7c3a9
......@@ -19,6 +19,9 @@ public enum EquipmentCategoryEnum {
BLW("补零位","0"),
JGM("监管码初始码","0000001"),
CSM("96333初始码","00001"),
YJL("已拒领","6037"),
YRL("已认领","6035"),
DRL("待认领","6036"),
CSZT("初始状态","0"),
YSY("已使用","1"),
WSY("未使用","2"),
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tzs.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo;
import java.util.LinkedHashMap;
import java.util.List;
......@@ -27,4 +28,6 @@ public interface IEquipmentCategoryService {
List<LinkedHashMap> getRegion(String level, String parentId);
Map<String,Object> getCategoryAndDefineByRecord(String rowId);
List<CategoryOtherInfo> checkCode(Map<String,Object> obj);
}
......@@ -17,7 +17,7 @@
<if test="supervisorCode != null and supervisorCode != ''">
, "SUPERVISORY_CODE" = #{supervisorCode}
</if>
<if test="code != null and code != ''">
<if test="code != ''">
, "CODE96333" = #{code}
</if>
WHERE
......
......@@ -13,8 +13,7 @@
LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code
LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code
WHERE
/*6036代表待认领*/
ibjoi.claim_status = '6036' AND ibjri."EQU_LIST" = #{code}
ibjoi.claim_status = '待认领' AND ibjri."EQU_LIST" = #{code}
<if test="level == 'company'">
AND ibjui."USE_UNIT_CREDIT_CODE"
LIKE CONCAT('%',#{companyCode},'%')
......@@ -34,8 +33,7 @@
LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code
LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code
WHERE
/**6035代表待认领*/
ibjoi.claim_status = '6035' AND ibjri."EQU_LIST" = #{code}
ibjoi.claim_status = '已认领' AND ibjri."EQU_LIST" = #{code}
<if test="level == 'company'">
AND ibjui."USE_UNIT_CREDIT_CODE"
LIKE CONCAT('%',#{companyCode},'%')
......@@ -55,8 +53,7 @@
LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code
LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code
WHERE
/**6037代表待认领*/
ibjoi.claim_status = '6037' AND ibjri."EQU_LIST" = #{code}
ibjoi.claim_status = '已拒领' AND ibjri."EQU_LIST" = #{code}
<if test="level == 'company'">
AND ibjui."USE_UNIT_CREDIT_CODE"
LIKE CONCAT('%',#{companyCode},'%')
......
......@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.CategoryOtherInfo;
import com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.tzs.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService;
......@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.EquipmentCategoryServic
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -196,6 +198,22 @@ public class EquipmentCategoryController extends BaseController {
return ResponseHelper.buildResponse(equipmentCategoryService.createSupervisorCode(map,null));
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/checkCode", method = RequestMethod.POST)
@ApiOperation(httpMethod = "post", value = "校验96333码", notes = "校验96333码")
public ResponseModel<Object> checkCode(@RequestBody Map<String,Object> obj){
List<CategoryOtherInfo> categoryOtherInfos = equipmentCategoryService.checkCode(obj);
if(categoryOtherInfos.size() == 0){
return ResponseHelper.buildResponse(categoryOtherInfos);
} else {
ResponseModel<Object> response = new ResponseModel();
response.setResult(null);
response.setMessage("96333码重复,请确认数据是否输入正确,或联系管辖机构处理。");
response.setStatus(HttpStatus.BAD_REQUEST.value());
return response;
}
}
/**
* 获取管辖分局树
......
......@@ -156,9 +156,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
equipCategory = map.get("equCategory").toString();
} else {
equInfoDto = categoryOtherInfoMapper.selectEquipInfo(record);
//判断这条数据认领状态是否为已认领(6035),且是否已经有电梯96333码和监管码
//如果都满足则直接返回不做生成码操作
if (!ObjectUtils.isEmpty(equInfoDto) && "6035".equals(equInfoDto.getStatus())) {
//判断这条数据认领状态是否为已认领,否则直接返回
if (!ObjectUtils.isEmpty(equInfoDto) && EquipmentCategoryEnum.YRL.getName().equals(equInfoDto.getStatus())) {
city = equInfoDto.getCity();
county = equInfoDto.getCounty();
equipCategory = equInfoDto.getEquipCategory();
......@@ -300,6 +299,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return equipmentCategoryMapper.getCategoryAndDefineByRecord(record);
}
@Override
public List<CategoryOtherInfo> checkCode(Map<String,Object> obj) {
List<CategoryOtherInfo> codeList = categoryOtherInfoMapper.selectList(new QueryWrapper<CategoryOtherInfo>().eq("CODE96333", obj.get("code")));
return codeList;
}
/**
* 获取行政区划以市或区的list集合
*
......@@ -334,9 +339,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
StringBuilder supervisorCode = new StringBuilder();
StringBuilder elevatorCode = new StringBuilder();
CategoryOtherInfo otherInfo;
String prefix = getPrefix(EquipmentCategoryEnum.XZQHDT.getCode(), city);
CategoryOtherInfo categoryOtherInfo = new CategoryOtherInfo();
String prefix;
if (equipCategory.startsWith("3") && !XIAN.equals(city)) {
prefix = getPrefix(EquipmentCategoryEnum.XZQHDT.getCode(), city);
//查询未使用的电梯码
CategoryOtherInfo categoryOtherInfo = categoryOtherInfoMapper.selectElevatorCode(prefix, EquipmentCategoryEnum.WSY.getCode());
categoryOtherInfo = categoryOtherInfoMapper.selectElevatorCode(prefix, EquipmentCategoryEnum.WSY.getCode());
}
if (!ObjectUtils.isEmpty(record)) {
//查询对应record对应数据
otherInfo = categoryOtherInfoMapper.selectOne(new QueryWrapper<CategoryOtherInfo>().eq("RECORD", record));
......
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