Commit d5d46c99 authored by 李龙阳's avatar 李龙阳

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register
parents 7a91f501 4878f8e6
...@@ -44,7 +44,7 @@ public class OpenApiControllerAop { ...@@ -44,7 +44,7 @@ public class OpenApiControllerAop {
String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany","/bizToken/applyToken", String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany","/bizToken/applyToken",
"/openapi/bizToken/getAppId","/lift/upload","/lift/status","/lift/run","/lift/fault", "/openapi/bizToken/getAppId","/lift/upload","/lift/status","/lift/run","/lift/fault",
"/lift/video/preview","/cylinderPage/serviceProvider","/cylinderPage/getTableInfo", "/lift/video/preview","/cylinderPage/serviceProvider","/cylinderPage/getTableInfo",
"/cylinderPage/initCylinderNum","/openapi/appId/setAppId","/openapi/xi-an/importData"}; "/cylinderPage/initCylinderNum","/openapi/appId/setAppId"};
// 获取请求路径 // 获取请求路径
for(String uri : url) { for(String uri : url) {
if(request.getRequestURI().indexOf(uri) != -1) { if(request.getRequestURI().indexOf(uri) != -1) {
......
...@@ -26,15 +26,12 @@ public class XiAnDataDockController { ...@@ -26,15 +26,12 @@ public class XiAnDataDockController {
} }
/** /**
* 批量导入设备数据的接口 * 西安除电梯外七大类设备批量导入
*
* @param file 上传的文件
* @return ResponseModel 封装的响应数据
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/importData") @PostMapping(value = "/importData")
@ApiOperation(httpMethod = "POST", value = "设备批量导入", notes = "导入多个设备的数据文件") @ApiOperation(httpMethod = "POST", value = "西安除电梯外七大类设备批量导入", notes = "西安除电梯外七大类设备批量导入")
public Object importPressureData(@RequestParam("file") MultipartFile file) { public Object importPressureData(@RequestParam MultipartFile file) {
// 校验文件是否为空 // 校验文件是否为空
if (file.isEmpty()) { if (file.isEmpty()) {
return ResponseHelper.buildResponse("文件不能为空"); return ResponseHelper.buildResponse("文件不能为空");
......
package com.yeejoin.amos.api.openapi.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.util.HashMap;
import java.util.Map;
public class DictParamsConverter implements Converter<String> {
private static final Map<String, String> dictMap = new HashMap<>();
static {
// 填充映射关系
dictMap.put("油", "5961");
dictMap.put("电", "5962");
dictMap.put("煤", "5963");
dictMap.put("水煤浆", "5964");
dictMap.put("生物质", "5965");
dictMap.put("余热", "5966");
dictMap.put("其他", "5967");
dictMap.put("射线", "5969");
dictMap.put("超声", "5970");
dictMap.put("磁粉", "5971");
dictMap.put("渗透", "5972");
dictMap.put("固定式", "5990");
dictMap.put("半挂式", "5991");
dictMap.put("公用管道", "5992");
dictMap.put("工业管道", "5993");
dictMap.put("锅筒(锅壳)", "6005");
dictMap.put("过热器出口集箱", "6006");
dictMap.put("启动分离器", "6007");
dictMap.put("长输管道", "5994");
dictMap.put("磁粉", "5988");
dictMap.put("射线", "5986");
dictMap.put("超声", "5987");
dictMap.put("渗透", "5989");
dictMap.put("A1", "6094");
dictMap.put("A2", "6095");
dictMap.put("A7", "6100");
dictMap.put("A8", "6101");
dictMap.put("A3", "6096");
dictMap.put("A4", "6097");
dictMap.put("A5", "6098");
dictMap.put("A6", "6099");
dictMap.put("牵引索", "6167");
dictMap.put("平衡索", "6168");
dictMap.put("Ⅰ类", "1");
dictMap.put("Ⅱ类", "2");
dictMap.put("Ⅲ类", "3");
dictMap.put("ⅢA类", "4");
dictMap.put("ⅢB类", "5");
dictMap.put("ⅢC类", "6");
dictMap.put("M1", "6531");
dictMap.put("M2", "6532");
dictMap.put("M3", "6533");
dictMap.put("M4", "6534");
dictMap.put("M5", "6535");
dictMap.put("M6", "6536");
dictMap.put("M7", "6537");
dictMap.put("M8", "6538");
dictMap.put("M9", "6539");
dictMap.put("M10", "6540");
dictMap.put("A级", "5957");
dictMap.put("B级", "5958");
dictMap.put("C级", "5959");
dictMap.put("D级", "5960");
dictMap.put("GC1", "6002");
dictMap.put("GC2", "6003");
dictMap.put("GC3", "6004");
dictMap.put("压缩天然气", "COMPRESSED_NATURAL_GAS");
dictMap.put("液化天然气", "LIQUEFIED_NATURAL_GAS");
dictMap.put("液化石油气", "LIQUEFIED_PETROLEUM_GAS");
dictMap.put("氢气", "HYDROGEN");
}
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
return dictMap.getOrDefault(cellValue, null);
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return new CellData("");
}
public static void main(String[] args) {
}
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
public class InformationSituationConverter implements Converter<String> {
private static final String TYPE_QR_CODE = "二维码";
private static final String TYPE_STAMP = "电子标签";
private static final String TYPE_NO = "无";
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
if (TYPE_QR_CODE.equals(cellValue)) {
return "1";
} else if (TYPE_STAMP.equals(cellValue)) {
return "2";
}
return "99";
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
// 判断实体类中获取的值,转换为Excel预期的值,并封装为CellData对象
if (o == null) {
return new CellData("");
} else if (o.equals("1")) {
return new CellData(TYPE_QR_CODE);
} else if (o.equals("2")) {
return new CellData(TYPE_STAMP);
}
return new CellData(TYPE_NO);
}
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
public class VehicleCylinderConverter implements Converter<String> {
private static final String WHETHER = "是";
private static final String NOT = "否";
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
// Excel中对应的CellData属性类型
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
if (WHETHER.equals(cellValue)) {
return "1";
} else if (NOT.equals(cellValue)) {
return "0";
}
return null;
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
// 判断实体类中获取的值,转换为Excel预期的值,并封装为CellData对象
if (o == null) {
return new CellData("");
} else if (o.equals("1")) {
return new CellData(WHETHER);
} else if (o.equals("0")) {
return new CellData(NOT);
}
return new CellData("");
}
}
\ No newline at end of file
...@@ -24,17 +24,17 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -24,17 +24,17 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
//----------------------------------------------------------------------基本信息 //----------------------------------------------------------------------基本信息
@ApiModelProperty(value = "设备种类") @ApiModelProperty(value = "设备种类")
@ExcelProperty(value = "设备种类",converter = EquListConverter.class) @ExcelProperty(value = "设备种类", converter = EquListConverter.class)
@NotBlank(message = "设备种类不能为空") @NotBlank(message = "设备种类不能为空")
private String equList; private String equList;
@ApiModelProperty(value = "设备类别") @ApiModelProperty(value = "设备类别")
@ExcelProperty(value = "设备类别",converter = EquCategoryConverter.class) @ExcelProperty(value = "设备类别", converter = EquCategoryConverter.class)
@NotBlank(message = "设备类别不能为空") @NotBlank(message = "设备类别不能为空")
private String equCategory; private String equCategory;
@ApiModelProperty(value = "设备品种") @ApiModelProperty(value = "设备品种")
@ExcelProperty(value = "设备品种",converter = EquDefineConverter.class) @ExcelProperty(value = "设备品种", converter = EquDefineConverter.class)
private String equDefine; private String equDefine;
@ApiModelProperty(value = "单位内编号") @ApiModelProperty(value = "单位内编号")
...@@ -64,7 +64,32 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -64,7 +64,32 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "设备代码") @ApiModelProperty(value = "设备代码")
@ExcelProperty(value = "设备代码") @ExcelProperty(value = "设备代码")
private String equCode;//判断是否必填和位数 private String equCode;
@ApiModelProperty(value = "工程(装置)名称")
@ExcelProperty(value = "工程(装置)名称")
private String projectContraption;
@ApiModelProperty(value = "是否球罐")
@ExcelProperty(value = "是否球罐", converter = VehicleCylinderConverter.class)
private String whetherSphericalTank;
@ApiModelProperty(value = "是否撬装式压力容器")
@ExcelProperty(value = "是否撬装式压力容器")
private String whetherSkidMountedPressureVessel;
@ApiModelProperty(value = "是否车用气瓶")
@ExcelProperty(value = "是否车用气瓶", converter = VehicleCylinderConverter.class)
@NotBlank(message = "是否车用气瓶不能为空")
private String whetherVehicleCylinder;
@ApiModelProperty(value = "信息化管理情况")
@ExcelProperty(value = "信息化管理情况", converter = InformationSituationConverter.class)
private String informationSituation;
@ApiModelProperty(value = "二维码或者电子标签编号")
@ExcelProperty(value = "二维码或者电子标签编号")
private String informationManageCode;
//-----------------------------------------------------------------------使用信息 //-----------------------------------------------------------------------使用信息
...@@ -175,7 +200,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -175,7 +200,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "起升高度(m)") @ApiModelProperty(value = "起升高度(m)")
private String liftingHeight; private String liftingHeight;
@ExcelProperty(value = "工作级别") @ExcelProperty(value = "工作级别", converter = DictParamsConverter.class)
@ApiModelProperty(value = "工作级别") @ApiModelProperty(value = "工作级别")
private String workLevel; private String workLevel;
...@@ -183,7 +208,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -183,7 +208,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "燃爆物质") @ApiModelProperty(value = "燃爆物质")
private String explosiveSubstance; private String explosiveSubstance;
@ExcelProperty(value = "区域防爆等级") @ExcelProperty(value = "区域防爆等级", converter = DictParamsConverter.class)
@ApiModelProperty(value = "区域防爆等级") @ApiModelProperty(value = "区域防爆等级")
private String explosionProofGrade; private String explosionProofGrade;
...@@ -229,11 +254,11 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -229,11 +254,11 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ExcelProperty(value = "额定乘员数(人)") @ExcelProperty(value = "额定乘员数(人)")
@ApiModelProperty(value = "额定乘员数(人)") @ApiModelProperty(value = "额定乘员数(人)")
private String aa; private String ratedMembers;
@ExcelProperty(value = "额定提升速度(m/min)") @ExcelProperty(value = "额定提升速度(m/min)")
@ApiModelProperty(value = "额定提升速度(m/min)") @ApiModelProperty(value = "额定提升速度(m/min)")
private String ratedMembers; private String ratedLiftingSpeed;
@ExcelProperty(value = "自由端高度(m)") @ExcelProperty(value = "自由端高度(m)")
@ApiModelProperty(value = "自由端高度(m)") @ApiModelProperty(value = "自由端高度(m)")
...@@ -340,7 +365,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -340,7 +365,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "防爆温度组别") @ApiModelProperty(value = "防爆温度组别")
private String temperatureGroup; private String temperatureGroup;
@ExcelProperty(value = "防爆设备保护级别") @ExcelProperty(value = "防爆设备保护级别", converter = DictParamsConverter.class)
@ApiModelProperty(value = "防爆设备保护级别") @ApiModelProperty(value = "防爆设备保护级别")
private String protectGrade; private String protectGrade;
...@@ -382,7 +407,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -382,7 +407,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
//--------------------------------------------------------------锅炉----技术参数 //--------------------------------------------------------------锅炉----技术参数
@ExcelProperty(value = "设备级别") @ExcelProperty(value = "设备级别", converter = DictParamsConverter.class)
@ApiModelProperty(value = "设备级别") @ApiModelProperty(value = "设备级别")
private String deviceLevel; private String deviceLevel;
...@@ -438,11 +463,11 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -438,11 +463,11 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "燃烧方式") @ApiModelProperty(value = "燃烧方式")
private String combustionMode; private String combustionMode;
@ExcelProperty(value = "燃料(热源)种类") @ExcelProperty(value = "燃料(热源)种类", converter = DictParamsConverter.class)
@ApiModelProperty(value = "燃料(热源)种类") @ApiModelProperty(value = "燃料(热源)种类")
private String fuelType; private String fuelType;
@ExcelProperty(value = "主要受压部件-名称") @ExcelProperty(value = "主要受压部件-名称", converter = DictParamsConverter.class)
@ApiModelProperty(value = "主要受压部件-名称") @ApiModelProperty(value = "主要受压部件-名称")
private String nameOfPressureParts; private String nameOfPressureParts;
...@@ -454,7 +479,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -454,7 +479,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "主要受压部件-壁厚(mm)") @ApiModelProperty(value = "主要受压部件-壁厚(mm)")
private String wallThicknessOfPressureParts; private String wallThicknessOfPressureParts;
@ExcelProperty(value = "主要受压部件-无损检测方法") @ExcelProperty(value = "主要受压部件-无损检测方法", converter = DictParamsConverter.class)
@ApiModelProperty(value = "主要受压部件-无损检测方法") @ApiModelProperty(value = "主要受压部件-无损检测方法")
private String nonDestructiveTestingMethodsForPressureParts; private String nonDestructiveTestingMethodsForPressureParts;
...@@ -516,7 +541,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -516,7 +541,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "壁厚") @ApiModelProperty(value = "壁厚")
private String wallThickness; private String wallThickness;
@ExcelProperty(value = "无损检测方法(气瓶)") @ExcelProperty(value = "无损检测方法(气瓶)", converter = DictParamsConverter.class)
@ApiModelProperty(value = "无损检测方法(气瓶)") @ApiModelProperty(value = "无损检测方法(气瓶)")
private String qpLossless; private String qpLossless;
...@@ -540,7 +565,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -540,7 +565,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "单瓶容积(L)") @ApiModelProperty(value = "单瓶容积(L)")
private String singleBottleVolume; private String singleBottleVolume;
@ExcelProperty(value = "充装介质") @ExcelProperty(value = "充装介质",converter = DictParamsConverter.class)
@ApiModelProperty(value = "充装介质") @ApiModelProperty(value = "充装介质")
private String chargingMedium; private String chargingMedium;
...@@ -552,7 +577,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -552,7 +577,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "材料(瓶体)") @ApiModelProperty(value = "材料(瓶体)")
private String bottleBody; private String bottleBody;
@ExcelProperty(value = "无损检测方法(管路)") @ExcelProperty(value = "无损检测方法(管路)", converter = DictParamsConverter.class)
@ApiModelProperty(value = "无损检测方法(管路)") @ApiModelProperty(value = "无损检测方法(管路)")
private String glLossless; private String glLossless;
...@@ -712,11 +737,11 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -712,11 +737,11 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "最高允许工作压力(壳程)") @ApiModelProperty(value = "最高允许工作压力(壳程)")
private String maxPressureShell; private String maxPressureShell;
@ExcelProperty(value = "主体结构型式") @ExcelProperty(value = "主体结构型式", converter = DictParamsConverter.class)
@ApiModelProperty(value = "主体结构型式") @ApiModelProperty(value = "主体结构型式")
private String mainStructureType; private String mainStructureType;
@ExcelProperty(value = "无损检测方法") @ExcelProperty(value = "无损检测方法", converter = DictParamsConverter.class)
@ApiModelProperty(value = "无损检测方法") @ApiModelProperty(value = "无损检测方法")
private String checkLossless; private String checkLossless;
...@@ -798,7 +823,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -798,7 +823,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
//--------------------------------------------------------------------压力管道----技术参数 //--------------------------------------------------------------------压力管道----技术参数
@ExcelProperty(value = "管道类别") @ExcelProperty(value = "管道类别", converter = DictParamsConverter.class)
@ApiModelProperty(value = "管道类别") @ApiModelProperty(value = "管道类别")
private String pipelineClass; private String pipelineClass;
...@@ -822,8 +847,8 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -822,8 +847,8 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "介质") @ApiModelProperty(value = "介质")
private String medium_YLGD; private String medium_YLGD;
@ExcelProperty(value = "起/始位置 (经纬度)") @ExcelProperty(value = "起/始位置 (经纬度)(格式:经度-纬度)")
@ApiModelProperty(value = "起/始位置 (经纬度)") @ApiModelProperty(value = "起/始位置 (经纬度)(格式:经度-纬度)")
private String startePosition; private String startePosition;
@ExcelProperty(value = "温度(℃)") @ExcelProperty(value = "温度(℃)")
...@@ -834,7 +859,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -834,7 +859,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "管道编号") @ApiModelProperty(value = "管道编号")
private String pipelineNumber; private String pipelineNumber;
@ExcelProperty(value = "管道级别") @ExcelProperty(value = "管道级别", converter = DictParamsConverter.class)
@ApiModelProperty(value = "管道级别") @ApiModelProperty(value = "管道级别")
private String deviceLevel_YLGD; private String deviceLevel_YLGD;
...@@ -930,7 +955,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto { ...@@ -930,7 +955,7 @@ public class XiAnEquipInfoExcelDto extends BaseDto {
@ApiModelProperty(value = "运量(p/h)") @ApiModelProperty(value = "运量(p/h)")
private String freightVolume; private String freightVolume;
@ExcelProperty(value = "运载索") @ExcelProperty(value = "运载索", converter = DictParamsConverter.class)
@ApiModelProperty(value = "运载索") @ApiModelProperty(value = "运载索")
private String carrierLine; private String carrierLine;
......
...@@ -14,7 +14,7 @@ import java.util.Date; ...@@ -14,7 +14,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@FeignClient(name = "TZS-JG-htt", path = "/jg", configuration = {FeignConfiguration.class}) @FeignClient(name = "TZS-JG", path = "/jg", configuration = {FeignConfiguration.class})
public interface TzsJgServiceFeignClient { public interface TzsJgServiceFeignClient {
/** /**
...@@ -92,4 +92,14 @@ public interface TzsJgServiceFeignClient { ...@@ -92,4 +92,14 @@ public interface TzsJgServiceFeignClient {
*/ */
@RequestMapping(value = "/common/checkEquCodeUniqueness", method = RequestMethod.GET) @RequestMapping(value = "/common/checkEquCodeUniqueness", method = RequestMethod.GET)
Boolean selectByEquCodeAndClaimStatus(@RequestParam("equCode") String equCode); Boolean selectByEquCodeAndClaimStatus(@RequestParam("equCode") String equCode);
/**
* 车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)
*
* @param factoryNum
* @return
*/
@RequestMapping(value = "/common/checkFactoryNumUniquenessForVehicleCylinder", method = RequestMethod.GET)
Integer checkFactoryNumUniquenessForVehicleCylinder(@RequestParam("factoryNum") String factoryNum);
} }
...@@ -4,7 +4,6 @@ import lombok.Getter; ...@@ -4,7 +4,6 @@ import lombok.Getter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.HashMap;
import java.util.List; import java.util.List;
@Getter @Getter
...@@ -18,6 +17,8 @@ public enum UnitTypeEnum { ...@@ -18,6 +17,8 @@ public enum UnitTypeEnum {
AGWDW("安装改造维修单位","1234","1"), AGWDW("安装改造维修单位","1234","1"),
//使用单位 //使用单位
SYDW("使用单位","1232","2"), SYDW("使用单位","1232","2"),
//使用单位
GRZT("个人主体","6601","2"),
//充装单位 //充装单位
CZDW("充装单位","1231","3"), CZDW("充装单位","1231","3"),
//检验检测机构 //检验检测机构
......
...@@ -157,4 +157,14 @@ public class JgChangeRegistrationReformDto extends BaseDto { ...@@ -157,4 +157,14 @@ public class JgChangeRegistrationReformDto extends BaseDto {
@ApiModelProperty(value = "设备地址") @ApiModelProperty(value = "设备地址")
private String equAddress; private String equAddress;
@ApiModelProperty(value = "作废原因")
private String cancelReason;
@ApiModelProperty(value = "作废日期")
private Date cancelDate;
@ApiModelProperty(value = "作废人员id")
private String cancelUserId;
} }
...@@ -233,4 +233,13 @@ public class JgMaintainNoticeDto extends BaseDto { ...@@ -233,4 +233,13 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty("工程装置") @ApiModelProperty("工程装置")
private String projectContraption; private String projectContraption;
@ApiModelProperty("作废原因")
private String cancelReason;
@ApiModelProperty("作废日期")
private Date cancelDate;
@ApiModelProperty("作废人员id")
private String cancelUserId;
} }
...@@ -259,4 +259,22 @@ public class JgChangeRegistrationReform extends BaseEntity { ...@@ -259,4 +259,22 @@ public class JgChangeRegistrationReform extends BaseEntity {
*/ */
@TableField("receive_company_org_code") @TableField("receive_company_org_code")
private String receiveCompanyOrgCode; private String receiveCompanyOrgCode;
/**
* 作废原因
*/
@TableField("cancel_reason")
private String cancelReason;
/**
* 作废日期
*/
@TableField("cancel_date")
private Date cancelDate;
/**
* 作废人员id
*/
@TableField("cancel_user_id")
private String cancelUserId;
} }
...@@ -8,6 +8,8 @@ import lombok.EqualsAndHashCode; ...@@ -8,6 +8,8 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* 维修告知 * 维修告知
...@@ -366,4 +368,28 @@ public class JgMaintainNotice extends BaseEntity { ...@@ -366,4 +368,28 @@ public class JgMaintainNotice extends BaseEntity {
*/ */
@TableField("project_contraption") @TableField("project_contraption")
private String projectContraption; private String projectContraption;
/**
* 告知设备列表
*/
@TableField(exist = false)
private List<Map<String, Object>> deviceList;
/**
* 作废原因
*/
@TableField("cancel_reason")
private String cancelReason;
/**
* 作废日期
*/
@TableField("cancel_date")
private Date cancelDate;
/**
* 作废人员id
*/
@TableField("cancel_user_id")
private String cancelUserId;
} }
...@@ -61,4 +61,12 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> { ...@@ -61,4 +61,12 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
void generateMaintainNoticeReport(Long sequenceNbr,HttpServletResponse response); void generateMaintainNoticeReport(Long sequenceNbr,HttpServletResponse response);
boolean deleteBySequenceNbr(Long[] sequenceNbr); boolean deleteBySequenceNbr(Long[] sequenceNbr);
/**
* 作废申请
* @param sequenceNbr 业务唯一标识
* @param cancelReason 作废原因
* @return JgInstallationNoticeDto
*/
JgMaintainNotice cancelApplication(Long sequenceNbr, String cancelReason, Map<String, Object> model);
} }
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
ur.next_task_id as nextTaskId, ur.next_task_id as nextTaskId,
ur.create_user_id as createUserId, ur.create_user_id as createUserId,
oi.CODE96333 as code96333, oi.CODE96333 as code96333,
ur.cancel_reason as cancelReason,
(SELECT name from tz_equipment_category ec WHERE ec.code = jri.EQU_LIST) AS equList, (SELECT name from tz_equipment_category ec WHERE ec.code = jri.EQU_LIST) AS equList,
(select name from tz_equipment_category ec WHERE ec.code = jri.EQU_DEFINE) AS equDefine (select name from tz_equipment_category ec WHERE ec.code = jri.EQU_DEFINE) AS equDefine
from tzs_jg_change_registration_reform ur from tzs_jg_change_registration_reform ur
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
isn.create_user_company_name AS createUserCompanyName, isn.create_user_company_name AS createUserCompanyName,
isn.next_execute_user_ids AS nextExecuteUserIds, isn.next_execute_user_ids AS nextExecuteUserIds,
isn.transfer_to_user_ids AS transferToUserIds, isn.transfer_to_user_ids AS transferToUserIds,
isn.cancel_reason AS cancelReason,
(SELECT name from tz_equipment_category ec WHERE ec.code = isn.equ_list_code) AS equListName, (SELECT name from tz_equipment_category ec WHERE ec.code = isn.equ_list_code) AS equListName,
DATE_FORMAT(isn.create_date,'%Y-%m-%d') AS createDate, DATE_FORMAT(isn.create_date,'%Y-%m-%d') AS createDate,
(select name from tz_equipment_category ec WHERE ec.code = isn.equ_category) AS equCategoryName (select name from tz_equipment_category ec WHERE ec.code = isn.equ_category) AS equCategoryName
......
...@@ -151,6 +151,7 @@ ...@@ -151,6 +151,7 @@
where where
pc.org_code like concat (#{reginCode},'%') pc.org_code like concat (#{reginCode},'%')
and tjurm.certificate_status = '已登记' and tjurm.certificate_status = '已登记'
and tjurm.is_delete = 0
</select> </select>
<select id="getRecords" resultType="com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto"> <select id="getRecords" resultType="com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto">
<include refid="page_list"/> <include refid="page_list"/>
......
...@@ -210,8 +210,8 @@ ...@@ -210,8 +210,8 @@
ibjui.USE_INNER_CODE as useInnerCode, ibjui.USE_INNER_CODE as useInnerCode,
ibjui.LONGITUDE_LATITUDE as longitudeLatitude, ibjui.LONGITUDE_LATITUDE as longitudeLatitude,
ibjui.FACTORY_USE_SITE_STREET as factoryUseSiteStreet ibjui.FACTORY_USE_SITE_STREET as factoryUseSiteStreet
FROM "idx_biz_jg_use_info" ibjui left join tzs_user_info tzi on ibjui."PHONE" = tzi."phone" FROM "idx_biz_jg_use_info" ibjui left join tzs_user_info tzi on ibjui."PHONE" = tzi."phone" AND tzi.is_delete = 'f'
where RECORD = #{id} AND tzi.is_delete = 'f' where RECORD = #{id}
</select> </select>
<select id="getEquipListPage" resultType="java.util.Map"> <select id="getEquipListPage" resultType="java.util.Map">
SELECT jri.EQU_CODE as equCode, SELECT jri.EQU_CODE as equCode,
......
...@@ -627,10 +627,17 @@ public class CommonController extends BaseController { ...@@ -627,10 +627,17 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse(commonService.getLatestJgUseRegistrationManage(company.getCompanyCode(), equDefineCode)); return ResponseHelper.buildResponse(commonService.getLatestJgUseRegistrationManage(company.getCompanyCode(), equDefineCode));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/checkEquCodeUniqueness") @GetMapping(value = "/checkEquCodeUniqueness")
@ApiOperation(httpMethod = "GET", value = "检查设备代码的唯一性", notes = "检查设备代码的唯一性") @ApiOperation(httpMethod = "GET", value = "检查设备代码的唯一性", notes = "检查设备代码的唯一性")
public Boolean checkEquCodeUniqueness(@RequestParam("equCode") String equCode) { public Boolean checkEquCodeUniqueness(@RequestParam("equCode") String equCode) {
return commonService.checkEquCodeUniqueness(equCode); return commonService.checkEquCodeUniqueness(equCode);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/checkFactoryNumUniquenessForVehicleCylinder")
@ApiOperation(httpMethod = "GET", value = "车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)", notes = "车用气瓶业务里面的 出厂编号/产品编码 校验唯一性(产品编号在车用气瓶范围内全局唯一)")
public Integer checkFactoryNumUniquenessForVehicleCylinder(@RequestParam("factoryNum") String factoryNum) {
return commonService.checkFactoryNumUniquenessForVehicleCylinder(factoryNum,null);
}
} }
...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams; ...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationReform;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeRegistrationReformServiceImpl; import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeRegistrationReformServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -40,7 +41,6 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -40,7 +41,6 @@ public class JgChangeRegistrationReformController extends BaseController {
/** /**
* 新增改造变更登记 * 新增改造变更登记
*
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save") @PostMapping(value = "/save")
...@@ -48,6 +48,7 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -48,6 +48,7 @@ public class JgChangeRegistrationReformController extends BaseController {
public ResponseModel<Object> save(@RequestBody JSONObject map) { public ResponseModel<Object> save(@RequestBody JSONObject map) {
return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.save(map)); return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.save(map));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/flowExecute") @PostMapping(value = "/flowExecute")
@ApiOperation(httpMethod = "POST", value = "执行流程", notes = "执行流程") @ApiOperation(httpMethod = "POST", value = "执行流程", notes = "执行流程")
...@@ -59,6 +60,7 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -59,6 +60,7 @@ public class JgChangeRegistrationReformController extends BaseController {
String.valueOf(map.get("nextTaskId"))); String.valueOf(map.get("nextTaskId")));
return ResponseHelper.buildResponse("ok"); return ResponseHelper.buildResponse("ok");
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/withdraw") @PostMapping(value = "/withdraw")
@ApiOperation(httpMethod = "POST", value = "撤回", notes = "撤回") @ApiOperation(httpMethod = "POST", value = "撤回", notes = "撤回")
...@@ -91,20 +93,20 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -91,20 +93,20 @@ public class JgChangeRegistrationReformController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询") @ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/getList") @GetMapping(value = "/getList")
public ResponseModel<Page<Map<String, Object>>> getList(JgChangeRegistrationReformDto dto, public ResponseModel<Page<Map<String, Object>>> getList(JgChangeRegistrationReformDto dto,
@RequestParam(value = "sort",required = false) String sort, @RequestParam(value = "sort", required = false) String sort,
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) { @RequestParam(value = "size") int size) {
Page<Map<String, Object>> page = new Page<>(current, size); Page<Map<String, Object>> page = new Page<>(current, size);
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
if(reginParams.getCompany().getLevel().equals(COMPANY_TYPE_COMPANY)){ if (reginParams.getCompany().getLevel().equals(COMPANY_TYPE_COMPANY)) {
dto.setDataType(COMPANY_TYPE_COMPANY); dto.setDataType(COMPANY_TYPE_COMPANY);
dto.setUseUnitCreditCode(reginParams.getCompany().getCompanyCode()); dto.setUseUnitCreditCode(reginParams.getCompany().getCompanyCode());
} else { } else {
dto.setDataType(COMPANY_TYPE_SUPERVISION); dto.setDataType(COMPANY_TYPE_SUPERVISION);
dto.setReceiveOrgCode(reginParams.getCompany().getCompanyCode()); dto.setReceiveOrgCode(reginParams.getCompany().getCompanyCode());
} }
Page<Map<String, Object>> list = jgChangeRegistrationReformServiceImpl.getList(dto,sort, page, dto.getRoleIds()); Page<Map<String, Object>> list = jgChangeRegistrationReformServiceImpl.getList(dto, sort, page, dto.getRoleIds());
list.getRecords().forEach(x-> x.put("companyType",reginParams.getCompany().getCompanyType())); list.getRecords().forEach(x -> x.put("companyType", reginParams.getCompany().getCompanyType()));
return ResponseHelper.buildResponse(list); return ResponseHelper.buildResponse(list);
} }
...@@ -112,12 +114,13 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -112,12 +114,13 @@ public class JgChangeRegistrationReformController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取详情", notes = "获取详情") @ApiOperation(httpMethod = "GET", value = "获取详情", notes = "获取详情")
@GetMapping(value = "/getDetail") @GetMapping(value = "/getDetail")
public ResponseModel<Map<String, Object>> getDetail(@RequestParam("currentDocumentId") String currentDocumentId,@RequestParam(value = "equipId",required = false) String equipId) { public ResponseModel<Map<String, Object>> getDetail(@RequestParam("currentDocumentId") String currentDocumentId, @RequestParam(value = "equipId", required = false) String equipId) {
return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.getDetail(currentDocumentId,equipId)); return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.getDetail(currentDocumentId, equipId));
} }
/** /**
* 改造登记-导出使用登记证 * 改造登记-导出使用登记证
*
* @param response 返回 * @param response 返回
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @param printType 打印类型,0-正常打印,1-套打(默认0) * @param printType 打印类型,0-正常打印,1-套打(默认0)
...@@ -126,19 +129,19 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -126,19 +129,19 @@ public class JgChangeRegistrationReformController extends BaseController {
@GetMapping(value = "/export") @GetMapping(value = "/export")
@ApiOperation(httpMethod = "GET", value = "改造登记-导出使用登记证", notes = "改造登记-导出使用登记证") @ApiOperation(httpMethod = "GET", value = "改造登记-导出使用登记证", notes = "改造登记-导出使用登记证")
public void exportImageZip(HttpServletResponse response, @RequestParam("sequenceNbr") String sequenceNbr, public void exportImageZip(HttpServletResponse response, @RequestParam("sequenceNbr") String sequenceNbr,
@RequestParam(value = "printType", defaultValue = "0") String printType){ @RequestParam(value = "printType", defaultValue = "0") String printType) {
jgChangeRegistrationReformServiceImpl.exportUseRegistrationCertificate(sequenceNbr, response, printType); jgChangeRegistrationReformServiceImpl.exportUseRegistrationCertificate(sequenceNbr, response, printType);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping (value = "/getEquDetail") @GetMapping(value = "/getEquDetail")
@ApiOperation(httpMethod = "GET", value = "根据使用登记证查询设备详情(前端组件默认传参record)", notes = "根据使用登记证查询设备详情") @ApiOperation(httpMethod = "GET", value = "根据使用登记证查询设备详情(前端组件默认传参record)", notes = "根据使用登记证查询设备详情")
public ResponseModel<Map<String, Object>> getEquDetail(@RequestParam String record) { public ResponseModel<Map<String, Object>> getEquDetail(@RequestParam String record) {
return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.getEquDetail(record)); return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.getEquDetail(record));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping (value = "/getUseRegistrationCodeData") @GetMapping(value = "/getUseRegistrationCodeData")
@ApiOperation(httpMethod = "GET", value = "获取当前企业,某接收机构审批的使用登记证信息", notes = "获取当前企业,某接收机构审批的使用登记证信息") @ApiOperation(httpMethod = "GET", value = "获取当前企业,某接收机构审批的使用登记证信息", notes = "获取当前企业,某接收机构审批的使用登记证信息")
public ResponseModel<Page<JgUseRegistrationManageDto>> getUseRegistrationCodeData( public ResponseModel<Page<JgUseRegistrationManageDto>> getUseRegistrationCodeData(
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
...@@ -164,24 +167,24 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -164,24 +167,24 @@ public class JgChangeRegistrationReformController extends BaseController {
dto.setReceiveCompanyCode(info.getCompany().getCompanyCode()); dto.setReceiveCompanyCode(info.getCompany().getCompanyCode());
} }
// 新增时使用EQU_LIST_CODE,适配组件,适配原有表单 // 新增时使用EQU_LIST_CODE,适配组件,适配原有表单
if (!ObjectUtils.isEmpty(EQU_LIST_CODE)){ if (!ObjectUtils.isEmpty(EQU_LIST_CODE)) {
dto.setEquListCode(EQU_LIST_CODE); dto.setEquListCode(EQU_LIST_CODE);
} }
// 流程页面使用equList,适配组件,适配原有表单 // 流程页面使用equList,适配组件,适配原有表单
if (!ObjectUtils.isEmpty(equList)){ if (!ObjectUtils.isEmpty(equList)) {
dto.setEquListCode(equList); dto.setEquListCode(equList);
} }
// 流程页面使用登记证号筛选,适配组件,适配原有表单 // 流程页面使用登记证号筛选,适配组件,适配原有表单
if (!ObjectUtils.isEmpty(useRegistrationCode)){ if (!ObjectUtils.isEmpty(useRegistrationCode)) {
dto.setUseRegistrationCode(useRegistrationCode); dto.setUseRegistrationCode(useRegistrationCode);
} }
// 流程页面使用equList,适配组件,适配原有表单 // 流程页面使用equList,适配组件,适配原有表单
if (!ObjectUtils.isEmpty(EQU_CATEGORY_CODE)){ if (!ObjectUtils.isEmpty(EQU_CATEGORY_CODE)) {
dto.setEquCategoryCode(EQU_CATEGORY_CODE); dto.setEquCategoryCode(EQU_CATEGORY_CODE);
} }
if (!ValidationUtil.isEmpty(receiveCompanyCode)){ if (!ValidationUtil.isEmpty(receiveCompanyCode)) {
String[] codes = receiveCompanyCode.split("_"); String[] codes = receiveCompanyCode.split("_");
if (!ValidationUtil.isEmpty(codes)){ if (!ValidationUtil.isEmpty(codes)) {
dto.setReceiveCompanyCode(codes[0]); dto.setReceiveCompanyCode(codes[0]);
} }
} }
...@@ -194,4 +197,12 @@ public class JgChangeRegistrationReformController extends BaseController { ...@@ -194,4 +197,12 @@ public class JgChangeRegistrationReformController extends BaseController {
dto.setCertificateStatus("1".equals(transferType) ? "已注销" : "已登记"); dto.setCertificateStatus("1".equals(transferType) ? "已注销" : "已登记");
return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.getUseRegistrationCodeData(page, dto)); return ResponseHelper.buildResponse(jgChangeRegistrationReformServiceImpl.getUseRegistrationCodeData(page, dto));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "PUT", value = "改造变更登记作废", notes = "改造变更登记作废")
@PutMapping(value = "/cancel/application")
public ResponseModel<JgChangeRegistrationReform> cancelApplication(@RequestBody JgChangeRegistrationReformDto registrationReformDto) {
JgChangeRegistrationReform result = jgChangeRegistrationReformServiceImpl.cancelApplication(registrationReformDto.getSequenceNbr(), registrationReformDto.getCancelReason());
return ResponseHelper.buildResponse(result);
}
} }
...@@ -144,4 +144,12 @@ public class JgMaintainNoticeController extends BaseController { ...@@ -144,4 +144,12 @@ public class JgMaintainNoticeController extends BaseController {
public void generateReport(HttpServletResponse response, @RequestParam("sequenceNbr") Long sequenceNbr) { public void generateReport(HttpServletResponse response, @RequestParam("sequenceNbr") Long sequenceNbr) {
iJgMaintainNoticeService.generateMaintainNoticeReport(sequenceNbr,response); iJgMaintainNoticeService.generateMaintainNoticeReport(sequenceNbr,response);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "PUT", value = "维修告知单个作废", notes = "维修告知单个作废")
@PutMapping(value = "/cancel/application")
public ResponseModel<JgMaintainNotice> cancelApplication(@RequestBody Map<String, Object> model) {
JgMaintainNotice result = iJgMaintainNoticeService.cancelApplication(Long.parseLong((String) model.get("sequenceNbr")), (String) model.get("cancelReason"), model);
return ResponseHelper.buildResponse(result);
}
} }
...@@ -32,10 +32,10 @@ public class XiAnDataDockController { ...@@ -32,10 +32,10 @@ public class XiAnDataDockController {
* @param equLists 设备数据集合 * @param equLists 设备数据集合
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/saveEquipmentData") @PostMapping(value = "/saveEquipmentData")
@ApiOperation(httpMethod = "POST", value = "设备批量导入", notes = "导入多个设备的数据文件") @ApiOperation(httpMethod = "POST", value = "设备批量导入", notes = "导入多个设备的数据文件")
public ResponseModel<?> saveEquipmentData(@RequestBody List<Map<?,?>> equLists) { public ResponseModel<?> saveEquipmentData(@RequestBody List<Map<?,?>> equLists) throws Exception {
return ResponseHelper.buildResponse(xiAnDataDockService.saveEquipmentData(equLists)); return ResponseHelper.buildResponse(xiAnDataDockService.saveEquipmentData(equLists));
} }
} }
......
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsBoiler; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsBoiler;
/** /**
...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsBoiler; ...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsBoiler;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
public interface IIdxBizJgTechParamsBoilerService { public interface IIdxBizJgTechParamsBoilerService extends IService<IdxBizJgTechParamsBoiler> {
void saveOrUpdateData(IdxBizJgTechParamsBoiler boiler); void saveOrUpdateData(IdxBizJgTechParamsBoiler boiler);
......
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator;
/** /**
...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator; ...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsElevator;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
public interface IIdxBizJgTechParamsElevatorService { public interface IIdxBizJgTechParamsElevatorService extends IService<IdxBizJgTechParamsElevator> {
boolean saveOrUpdateData(IdxBizJgTechParamsElevator techParamsElevator); boolean saveOrUpdateData(IdxBizJgTechParamsElevator techParamsElevator);
......
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting;
/** /**
...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting; ...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
public interface IIdxBizJgTechParamsLiftingService { public interface IIdxBizJgTechParamsLiftingService extends IService<IdxBizJgTechParamsLifting> {
void saveOrUpdateData(IdxBizJgTechParamsLifting lifting); void saveOrUpdateData(IdxBizJgTechParamsLifting lifting);
......
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline;
/** /**
...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline; ...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
public interface IIdxBizJgTechParamsPipelineService { public interface IIdxBizJgTechParamsPipelineService extends IService<IdxBizJgTechParamsPipeline> {
void saveOrUpdateData(IdxBizJgTechParamsPipeline pipeline); void saveOrUpdateData(IdxBizJgTechParamsPipeline pipeline);
......
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRides; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRides;
/** /**
...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRides; ...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRides;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
public interface IIdxBizJgTechParamsRidesService { public interface IIdxBizJgTechParamsRidesService extends IService<IdxBizJgTechParamsRides> {
void saveOrUpdateData(IdxBizJgTechParamsRides rides); void saveOrUpdateData(IdxBizJgTechParamsRides rides);
......
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRopeway; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRopeway;
/** /**
...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRopeway; ...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsRopeway;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
public interface IIdxBizJgTechParamsRopewayService { public interface IIdxBizJgTechParamsRopewayService extends IService<IdxBizJgTechParamsRopeway> {
void saveOrUpdateData(IdxBizJgTechParamsRopeway ropeway); void saveOrUpdateData(IdxBizJgTechParamsRopeway ropeway);
......
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVehicle; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVehicle;
/** /**
...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVehicle; ...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVehicle;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
public interface IIdxBizJgTechParamsVehicleService { public interface IIdxBizJgTechParamsVehicleService extends IService<IdxBizJgTechParamsVehicle> {
void saveOrUpdateData(IdxBizJgTechParamsVehicle vehicle); void saveOrUpdateData(IdxBizJgTechParamsVehicle vehicle);
......
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVessel; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVessel;
/** /**
...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVessel; ...@@ -9,7 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsVessel;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
public interface IIdxBizJgTechParamsVesselService { public interface IIdxBizJgTechParamsVesselService extends IService<IdxBizJgTechParamsVessel> {
void saveOrUpdateData(IdxBizJgTechParamsVessel vessel); void saveOrUpdateData(IdxBizJgTechParamsVessel vessel);
......
...@@ -2139,6 +2139,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2139,6 +2139,7 @@ public class CommonServiceImpl implements ICommonService {
LambdaQueryWrapper<JgUseRegistrationManage> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JgUseRegistrationManage> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgUseRegistrationManage::getUseUnitCreditCode, useUnitCreditCode) queryWrapper.eq(JgUseRegistrationManage::getUseUnitCreditCode, useUnitCreditCode)
.eq(JgUseRegistrationManage::getEquDefineCode, equDefineCode) .eq(JgUseRegistrationManage::getEquDefineCode, equDefineCode)
.eq(JgUseRegistrationManage::getIsDelete,0)
.eq(JgUseRegistrationManage::getCertificateStatus, CertificateStatusEnum.YIDENGJI.getName()) .eq(JgUseRegistrationManage::getCertificateStatus, CertificateStatusEnum.YIDENGJI.getName())
.orderByDesc(JgUseRegistrationManage::getCertificateNo); .orderByDesc(JgUseRegistrationManage::getCertificateNo);
return jgUseRegistrationManageMapper.selectList(queryWrapper).stream() return jgUseRegistrationManageMapper.selectList(queryWrapper).stream()
......
...@@ -89,6 +89,7 @@ import java.time.format.DateTimeFormatter; ...@@ -89,6 +89,7 @@ import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.alibaba.fastjson.JSON.toJSONString; import static com.alibaba.fastjson.JSON.toJSONString;
import static com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum.SPECIAL_CYLINDER; import static com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum.SPECIAL_CYLINDER;
...@@ -415,8 +416,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -415,8 +416,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private void checkEquCodeUniqueness(LinkedHashMap equipmentInfoForm) { private void checkEquCodeUniqueness(LinkedHashMap equipmentInfoForm) {
// 根据设备代码检查唯一性 // 根据设备代码检查唯一性
Integer count = idxBizJgRegisterInfoMapper.selectByEquCodeAndClaimStatus((String) equipmentInfoForm.get(EQU_CODE), (String) equipmentInfoForm.get(SEQUENCE_NBR)); String equCode = (String) equipmentInfoForm.get(EQU_CODE);
if (count > 0) { String sequenceNbr = (String) equipmentInfoForm.get(SEQUENCE_NBR);
List<Integer> results = Stream.of(idxBizJgRegisterInfoMapper.selectByEquCodeAndClaimStatus(equCode, sequenceNbr),
idxBizJgRegisterInfoMapper.selectInstallNoticeEqByEquCode(equCode, sequenceNbr)
).collect(Collectors.toList());
if (results.stream().anyMatch(count -> count > 0)) {
throw new BadRequest("设备代码已存在,请重新输入!"); throw new BadRequest("设备代码已存在,请重新输入!");
} }
} }
...@@ -1129,7 +1135,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1129,7 +1135,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
* @param fieldType 返回字段类型【CamelCase:驼峰命名,“”:纯大写加下划线】 * @param fieldType 返回字段类型【CamelCase:驼峰命名,“”:纯大写加下划线】
* @return * @return
*/ */
private Map<String, Object> getEquipParamsMap(String record, String fieldType, String equipCode) { public Map<String, Object> getEquipParamsMap(String record, String fieldType, String equipCode) {
Map<String, Object> objMap = new HashMap<>(); Map<String, Object> objMap = new HashMap<>();
if (EquipmentClassifityEnum.DT.getCode().equals(equipCode)) { if (EquipmentClassifityEnum.DT.getCode().equals(equipCode)) {
...@@ -1488,21 +1494,26 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1488,21 +1494,26 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// DATA_SOURCE 为“jg”开头的数据(从监管新加或复制的设备) // DATA_SOURCE 为“jg”开头的数据(从监管新加或复制的设备)
// 20240314 提出的监管业务不要让企业用户选到之前一码通认领或补录的设备,让从监管业务中去新增 // 20240314 提出的监管业务不要让企业用户选到之前一码通认领或补录的设备,让从监管业务中去新增
BoolQueryBuilder dBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder dBuilder = QueryBuilders.boolQuery();
String queryType = map.getString("QUERY_TYPE");
if (map.containsKey("DATA_SOURCE") && !ObjectUtils.isEmpty(map.get("DATA_SOURCE"))) { if (map.containsKey("DATA_SOURCE") && !ObjectUtils.isEmpty(map.get("DATA_SOURCE"))) {
if ("jg_his".equals(map.get("DATA_SOURCE"))) {// 只查历史,前缀jg_his String dataSource = map.getString("DATA_SOURCE");
if ("jg_his".equals(dataSource)) {
// 只查历史,前缀为 jg_his
dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his")); dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his"));
} else if (!"jg_his".equals(map.getString("DATA_SOURCE"))) {// 只查新增,前缀为jg且前缀不为jg_his } else {
dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg")); // 只查新增,前缀为 jg 且前缀不为 jg_his
dBuilder.mustNot(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his")); dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg"))
.mustNot(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his"));
} }
} else if (ValidationUtil.equals(queryType, "WB")) {
// 对于xWB类型查询,排除jg_his
dBuilder.mustNot(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his"));
} else { } else {
// 查所有,前缀jg // 查所有,前缀 jg
dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg")); dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg"));
} }
boolMust.must(dBuilder); boolMust.must(dBuilder);
String queryType = map.getString("QUERY_TYPE");
if (!ObjectUtils.isEmpty(queryType)) { if (!ObjectUtils.isEmpty(queryType)) {
// 查询 安装告知【可告知设备列表】【USE_UNIT_CREDIT_CODE=== null || ""】 // 查询 安装告知【可告知设备列表】【USE_UNIT_CREDIT_CODE=== null || ""】
if (ValidationUtil.equals(queryType, "AZ")) {// 安装 if (ValidationUtil.equals(queryType, "AZ")) {// 安装
...@@ -2342,17 +2353,17 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2342,17 +2353,17 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (isCopy) { if (isCopy) {
// 设备状态置空 // 设备状态置空
useInfo.setEquState(null); useInfo.setEquState("");
// 如果为安改维单位复制设备,则将使用单位信息置空 // 如果为安改维单位复制设备,则将使用单位信息置空
if (companyTypeStr.equals(CompanyTypeEnum.CONSTRUCTION.getCode())) { if (companyTypeStr.equals(CompanyTypeEnum.CONSTRUCTION.getCode())) {
useInfo.setUseUnitCreditCode(null); useInfo.setUseUnitCreditCode("");
useInfo.setUseUnitName(null); useInfo.setUseUnitName("");
} }
// 如果既为安改维单位又是使用单位,则将厂车、起重机械-流动式起重机、压力容器-气瓶安改维单位信息置空 // 如果既为安改维单位又是使用单位,则将厂车、起重机械-流动式起重机、压力容器-气瓶安改维单位信息置空
if (companyTypeStr.contains(CompanyTypeEnum.CONSTRUCTION.getCode()) && companyTypeStr.contains(CompanyTypeEnum.USE.getCode())) { if (companyTypeStr.contains(CompanyTypeEnum.CONSTRUCTION.getCode()) && companyTypeStr.contains(CompanyTypeEnum.USE.getCode())) {
if (!registerInfo.getEquList().equals("5000") && !registerInfo.getEquCategory().equals("4400") && !registerInfo.getEquCategory().equals("2300")) { if (!registerInfo.getEquList().equals("5000") && !registerInfo.getEquCategory().equals("4400") && !registerInfo.getEquCategory().equals("2300")) {
constructionInfo.setUscUnitCreditCode(null); constructionInfo.setUscUnitCreditCode("");
constructionInfo.setUscUnitName(null); constructionInfo.setUscUnitName("");
} }
} }
} }
...@@ -2386,14 +2397,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2386,14 +2397,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (isCopy) { if (isCopy) {
if (companyTypeStr.equals(CompanyTypeEnum.USE.getCode()) || companyTypeStr.equals(CompanyTypeEnum.INDIVIDUAL.getCode())) { if (companyTypeStr.equals(CompanyTypeEnum.USE.getCode()) || companyTypeStr.equals(CompanyTypeEnum.INDIVIDUAL.getCode())) {
constructionInfo.setUscUnitCreditCode(null); constructionInfo.setUscUnitCreditCode("");
constructionInfo.setUscUnitName(null); constructionInfo.setUscUnitName("");
} }
// 如果既为安改维单位又是使用单位,则将厂车、起重机械-流动式起重机、压力容器-气瓶安改维单位信息置空 // 如果既为安改维单位又是使用单位,则将厂车、起重机械-流动式起重机、压力容器-气瓶安改维单位信息置空
if (companyTypeStr.contains(CompanyTypeEnum.CONSTRUCTION.getCode()) && companyTypeStr.contains(CompanyTypeEnum.USE.getCode())) { if (companyTypeStr.contains(CompanyTypeEnum.CONSTRUCTION.getCode()) && companyTypeStr.contains(CompanyTypeEnum.USE.getCode())) {
if (registerInfo.getEquList().equals("5000") || registerInfo.getEquCategory().equals("4400") || registerInfo.getEquCategory().equals("2300")) { if (registerInfo.getEquList().equals("5000") || registerInfo.getEquCategory().equals("4400") || registerInfo.getEquCategory().equals("2300")) {
constructionInfo.setUscUnitCreditCode(null); constructionInfo.setUscUnitCreditCode("");
constructionInfo.setUscUnitName(null); constructionInfo.setUscUnitName("");
} }
} }
} }
...@@ -2409,7 +2420,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2409,7 +2420,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 补丁:saveOrUpdate在update数据时不会更新字段为null的字段,但是编辑设备的代码时,从有改成无,equCode解析成null,但是此时需要将equcode删掉 // 补丁:saveOrUpdate在update数据时不会更新字段为null的字段,但是编辑设备的代码时,从有改成无,equCode解析成null,但是此时需要将equcode删掉
registerInfo.setEquCode(ObjectUtils.isEmpty(registerInfo.getEquCode()) ? "" : registerInfo.getEquCode()); registerInfo.setEquCode(ObjectUtils.isEmpty(registerInfo.getEquCode()) ? "" : registerInfo.getEquCode());
// copy设备 =》 使用登记证号置空 // copy设备 =》 使用登记证号置空
registerInfo.setUseOrgCode(isCopy ? null : registerInfo.getUseOrgCode()); registerInfo.setUseOrgCode(isCopy ? "" : registerInfo.getUseOrgCode());
this.saveOrUpdate(registerInfo); this.saveOrUpdate(registerInfo);
// 维保备案 // 维保备案
...@@ -2430,12 +2441,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2430,12 +2441,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
otherInfo.setRecDate(date); otherInfo.setRecDate(date);
otherInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("OTHERINFO_SEQ"))); otherInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("OTHERINFO_SEQ")));
if (isCopy) { if (isCopy) {
// 96333码和监管码置空 // 复制且有无96333识别码选择 无 96333码置空
otherInfo.setCode96333(null); if("2".equals(otherInfo.getCode96333Type())){
otherInfo.setSupervisoryCode(null); otherInfo.setCode96333("");
otherInfo.setCylinderStampAttachment(null); }
otherInfo.setInformationSituation(null); // 监管码置空
otherInfo.setInformationManageCode(null); otherInfo.setSupervisoryCode("");
otherInfo.setCylinderStampAttachment("");
otherInfo.setInformationSituation("");
otherInfo.setInformationManageCode("");
}
// 编辑时,如果选择<无96333识别码>,则把已经入库的数据清除掉
if(OPERATEEDIT.equals(operateType) && "2".equals(otherInfo.getCode96333Type())){
otherInfo.setCode96333("");
} }
iIdxBizJgOtherInfoService.saveOrUpdateData(otherInfo); iIdxBizJgOtherInfoService.saveOrUpdateData(otherInfo);
......
...@@ -962,7 +962,10 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -962,7 +962,10 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jgCertificateChangeRecordEqService.saveBatch(jgCertificateChangeRecordEqs); jgCertificateChangeRecordEqService.saveBatch(jgCertificateChangeRecordEqs);
// 当企业下所有使用登记证单位信息都改为最新的时候再去修改系统中单位信息 // 当企业下所有使用登记证单位信息都改为最新的时候再去修改系统中单位信息
Integer count = jgUseRegistrationManageService.lambdaQuery().eq(JgUseRegistrationManage::getUseUnitCreditCode, jgChangeRegistrationName.getUseUnitCreditCode()).eq(JgUseRegistrationManage::getUseUnitName, jgChangeRegistrationName.getUseUnitName()).count(); Integer count = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseUnitCreditCode, jgChangeRegistrationName.getUseUnitCreditCode())
.eq(JgUseRegistrationManage::getIsDelete,0)
.eq(JgUseRegistrationManage::getUseUnitName, jgChangeRegistrationName.getUseUnitName()).count();
if (count == 0) { if (count == 0) {
// 修改企业信息 // 修改企业信息
LambdaUpdateWrapper<TzBaseEnterpriseInfo> updateWrapper2 = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TzBaseEnterpriseInfo> updateWrapper2 = new LambdaUpdateWrapper<>();
......
...@@ -456,7 +456,10 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh ...@@ -456,7 +456,10 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
public void saveRecord(JgChangeVehicleRegistrationUnit jgChangeVehicleRegistrationUnit, TaskV2Model taskV2Model) { public void saveRecord(JgChangeVehicleRegistrationUnit jgChangeVehicleRegistrationUnit, TaskV2Model taskV2Model) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
JgUseRegistrationManage manage = jgUseRegistrationManageService.lambdaQuery().eq(JgUseRegistrationManage::getUseRegistrationCode, jgChangeVehicleRegistrationUnit.getUseRegistCode()).one(); JgUseRegistrationManage manage = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, jgChangeVehicleRegistrationUnit.getUseRegistCode())
.eq(JgUseRegistrationManage::getIsDelete, 0)
.one();
// 业务流水生成 // 业务流水生成
JgRegistrationHistory jgRegistrationHistory = jgRegistrationHistoryService.lambdaQuery().eq(JgRegistrationHistory::getCurrentDocumentId, jgChangeVehicleRegistrationUnit.getSequenceNbr()).one(); JgRegistrationHistory jgRegistrationHistory = jgRegistrationHistoryService.lambdaQuery().eq(JgRegistrationHistory::getCurrentDocumentId, jgChangeVehicleRegistrationUnit.getSequenceNbr()).one();
JSONObject jsonObject = JSONObject.parseObject(jgRegistrationHistory.getChangeData()); JSONObject jsonObject = JSONObject.parseObject(jgRegistrationHistory.getChangeData());
...@@ -707,7 +710,10 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh ...@@ -707,7 +710,10 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
// 组件回显 // 组件回显
map.put("useRegistrationCode", useRegistrationCode); map.put("useRegistrationCode", useRegistrationCode);
JgUseRegistrationManage registrationManage = jgUseRegistrationManageService.lambdaQuery().eq(JgUseRegistrationManage::getUseRegistrationCode, useRegistrationCode).one(); JgUseRegistrationManage registrationManage = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, useRegistrationCode)
.eq(JgUseRegistrationManage::getIsDelete,0)
.one();
List<JSONObject> jsonObjects = jgUseRegistrationManageService.queryEquByCertificateSeq(registrationManage.getSequenceNbr()); List<JSONObject> jsonObjects = jgUseRegistrationManageService.queryEquByCertificateSeq(registrationManage.getSequenceNbr());
if (!ObjectUtils.isEmpty(jsonObjects)) { if (!ObjectUtils.isEmpty(jsonObjects)) {
// JgVehicleInformation information = jgVehicleInformationService.lambdaQuery().eq(JgVehicleInformation::getUseRegistrationCode, useRegistrationCode).one(); // JgVehicleInformation information = jgVehicleInformationService.lambdaQuery().eq(JgVehicleInformation::getUseRegistrationCode, useRegistrationCode).one();
......
...@@ -625,6 +625,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -625,6 +625,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
String useCode = String.valueOf(informObj.get("installUnitCreditCode")); String useCode = String.valueOf(informObj.get("installUnitCreditCode"));
LambdaQueryWrapper<TzBaseUnitLicence> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TzBaseUnitLicence> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TzBaseUnitLicence::getUnitCode, useCode); wrapper.eq(TzBaseUnitLicence::getUnitCode, useCode);
wrapper.orderByDesc(TzBaseUnitLicence::getExpiryDate);
wrapper.orderByDesc(TzBaseUnitLicence::getRecDate);
wrapper.last(" LIMIT 3"); wrapper.last(" LIMIT 3");
List<TzBaseUnitLicence> list = baseUnitLicenceMapper.selectList(wrapper); List<TzBaseUnitLicence> list = baseUnitLicenceMapper.selectList(wrapper);
......
...@@ -1033,6 +1033,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1033,6 +1033,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (!ObjectUtils.isEmpty(jgUseRegistration.getUseRegistrationCode())){ if (!ObjectUtils.isEmpty(jgUseRegistration.getUseRegistrationCode())){
JgUseRegistrationManage manage = jgUseRegistrationManageService.lambdaQuery() JgUseRegistrationManage manage = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, jgUseRegistration.getUseRegistrationCode()) .eq(JgUseRegistrationManage::getUseRegistrationCode, jgUseRegistration.getUseRegistrationCode())
.eq(JgUseRegistrationManage::getIsDelete, 0)
.eq(JgUseRegistrationManage::getCertificateStatus,CertificateStatusEnum.YIDENGJI.getName()).one(); .eq(JgUseRegistrationManage::getCertificateStatus,CertificateStatusEnum.YIDENGJI.getName()).one();
changeRecord.setCertificateNo(manage.getCertificateNo());//登记证书唯一码 changeRecord.setCertificateNo(manage.getCertificateNo());//登记证书唯一码
} }
...@@ -2362,7 +2363,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2362,7 +2363,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
Map<String, Object> result = code.getResult(); Map<String, Object> result = code.getResult();
if (!ObjectUtils.isEmpty(result)) { if (!ObjectUtils.isEmpty(result)) {
otherInfo.setSupervisoryCode(String.valueOf(result.get("superviseCode"))); otherInfo.setSupervisoryCode(String.valueOf(result.get("superviseCode")));
otherInfo.setCode96333(ObjectUtils.isEmpty(result.get("code96333")) ? null : String.valueOf(result.get("code96333"))); // 历史登记时 96333如果自行输入则不再进行生成插入
if(StringUtils.isEmpty(otherInfo.getCode96333())){
otherInfo.setCode96333(ObjectUtils.isEmpty(result.get("code96333")) ? "" : String.valueOf(result.get("code96333")));
}
// 更新使用登记业务表 // 更新使用登记业务表
jgUseRegistration.setSupervisoryCode(String.valueOf(result.get("superviseCode"))); jgUseRegistration.setSupervisoryCode(String.valueOf(result.get("superviseCode")));
} }
...@@ -3015,8 +3019,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -3015,8 +3019,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 设备安装信息更新 // 设备安装信息更新
this.historyEquUpdateInstallInfo(map); this.historyEquUpdateInstallInfo(map);
// 设备维保信息更新 // 设备维保信息更新,只有电梯
if ("3000".equals(map.get("equList"))){
this.historyEquUpdateMaintenanceInfo(map); this.historyEquUpdateMaintenanceInfo(map);
}
// 历史设备 生成证书管理表记录 & 生成安装 维保等操作记录 // 历史设备 生成证书管理表记录 & 生成安装 维保等操作记录
this.historyEquGenManageRelated(map, jgUseRegistration, registerInfo, idxBizJgFactoryInfo); this.historyEquGenManageRelated(map, jgUseRegistration, registerInfo, idxBizJgFactoryInfo);
...@@ -3043,8 +3049,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -3043,8 +3049,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
SimpleDateFormat format = new SimpleDateFormat(); SimpleDateFormat format = new SimpleDateFormat();
IdxBizJgMaintenanceRecordInfo info = idxBizJgMaintenanceRecordInfoService.queryNewestDetailByRecord(String.valueOf(map.get("equipId"))); IdxBizJgMaintenanceRecordInfo info = idxBizJgMaintenanceRecordInfoService.queryNewestDetailByRecord(String.valueOf(map.get("equipId")));
if (!ValidationUtil.isEmpty(info.getSequenceNbr())) { if (!ValidationUtil.isEmpty(info.getSequenceNbr())) {
info.setMeUnitName(ValidationUtil.isEmpty(map.get("meUnitName")) ? null : String.valueOf(map.get("meUnitName")).split("_")[1]); String meUnitName = String.valueOf(map.get("meUnitName"));
info.setMeUnitCreditCode(ValidationUtil.isEmpty(map.get("meUnitName")) ? null : String.valueOf(map.get("meUnitName")).split("_")[0]); info.setMeUnitName(!ValidationUtil.isEmpty(meUnitName) && meUnitName.contains("_") ? meUnitName.split("_")[1] : null);
info.setMeUnitCreditCode(!ValidationUtil.isEmpty(meUnitName) && meUnitName.contains("_") ? meUnitName.split("_")[0] : null);
info.setMeMaster(ValidationUtil.isEmpty(map.get("maintenanceManagerOneName")) ? null : String.valueOf(map.get("maintenanceManagerOneName"))); info.setMeMaster(ValidationUtil.isEmpty(map.get("maintenanceManagerOneName")) ? null : String.valueOf(map.get("maintenanceManagerOneName")));
info.setMeMasterPhone(ValidationUtil.isEmpty(map.get("maintenanceManagerOnePhone")) ? null : String.valueOf(map.get("maintenanceManagerOnePhone"))); info.setMeMasterPhone(ValidationUtil.isEmpty(map.get("maintenanceManagerOnePhone")) ? null : String.valueOf(map.get("maintenanceManagerOnePhone")));
info.setMeMasterId(ValidationUtil.isEmpty(map.get("maintenanceManagerOneID")) ? null : String.valueOf(map.get("maintenanceManagerOneID"))); info.setMeMasterId(ValidationUtil.isEmpty(map.get("maintenanceManagerOneID")) ? null : String.valueOf(map.get("maintenanceManagerOneID")));
......
...@@ -1573,6 +1573,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -1573,6 +1573,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
if (!ObjectUtils.isEmpty(jgVehicleInformation.getUseRegistrationCode())){ if (!ObjectUtils.isEmpty(jgVehicleInformation.getUseRegistrationCode())){
JgUseRegistrationManage manage = jgUseRegistrationManageService.lambdaQuery() JgUseRegistrationManage manage = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, jgVehicleInformation.getUseRegistrationCode()) .eq(JgUseRegistrationManage::getUseRegistrationCode, jgVehicleInformation.getUseRegistrationCode())
.eq(JgUseRegistrationManage::getIsDelete, 0)
.eq(JgUseRegistrationManage::getCertificateStatus,CertificateStatusEnum.YIDENGJI.getName()).one(); .eq(JgUseRegistrationManage::getCertificateStatus,CertificateStatusEnum.YIDENGJI.getName()).one();
changeRecord.setCertificateNo(manage.getCertificateNo());//登记证书唯一码 changeRecord.setCertificateNo(manage.getCertificateNo());//登记证书唯一码
} }
...@@ -1890,6 +1891,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -1890,6 +1891,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
this.getBaseMapper().updateById(vehicleInformation); this.getBaseMapper().updateById(vehicleInformation);
JgUseRegistrationManage useRegistrationCode = jgUseRegistrationManageService.lambdaQuery() JgUseRegistrationManage useRegistrationCode = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, vehicleInformation.getUseRegistrationCode()) .eq(JgUseRegistrationManage::getUseRegistrationCode, vehicleInformation.getUseRegistrationCode())
.eq(JgUseRegistrationManage::getIsDelete, 0)
.one(); .one();
if (useRegistrationCode != null) { if (useRegistrationCode != null) {
useRegistrationCode.setCarNumber(vehicleInformation.getCarNumber()); useRegistrationCode.setCarNumber(vehicleInformation.getCarNumber());
...@@ -2086,6 +2088,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -2086,6 +2088,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
this.getBaseMapper().updateById(vehicleInformation); this.getBaseMapper().updateById(vehicleInformation);
JgUseRegistrationManage useRegistrationCode = jgUseRegistrationManageService.lambdaQuery() JgUseRegistrationManage useRegistrationCode = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, vehicleInformation.getUseRegistrationCode()) .eq(JgUseRegistrationManage::getUseRegistrationCode, vehicleInformation.getUseRegistrationCode())
.eq(JgUseRegistrationManage::getIsDelete, 0)
.one(); .one();
if (useRegistrationCode != null) { if (useRegistrationCode != null) {
useRegistrationCode.setCarNumber(vehicleInformation.getCarNumber()); useRegistrationCode.setCarNumber(vehicleInformation.getCarNumber());
......
...@@ -190,7 +190,7 @@ public class JyjcInspectionResultController extends BaseController { ...@@ -190,7 +190,7 @@ public class JyjcInspectionResultController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "检验类型-按照身份查询", notes = "\"检验类型-按照身份查询") @ApiOperation(httpMethod = "GET", value = "检验类型-按照身份查询", notes = "检验类型-按照身份查询")
@GetMapping(value = "/inspectType/list") @GetMapping(value = "/inspectType/list")
public ResponseModel<List<DictionarieModel>> inspectTypeListByPerson(){ public ResponseModel<List<DictionarieModel>> inspectTypeListByPerson(){
return ResponseHelper.buildResponse(jyjcInspectionResultServiceImpl.inspectTypeListByPerson(getSelectedOrgInfo())); return ResponseHelper.buildResponse(jyjcInspectionResultServiceImpl.inspectTypeListByPerson(getSelectedOrgInfo()));
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( subquery.org_code, '%' ) INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( subquery.org_code, '%' )
INNER JOIN tzs_user_info tui ON bi.use_code = tui.unit_code INNER JOIN tzs_user_info tui ON bi.use_code = tui.unit_code
WHERE WHERE
tui.post LIKE concat ( '%', '6552', '%' ) tui.new_post LIKE concat ( '%', '6552', '%' )
AND tui.is_delete = 'f'
AND bi.unit_type IS NOT NULL AND bi.unit_type IS NOT NULL
</select> </select>
<select id="supervisorCount" resultType="java.util.Map"> <select id="supervisorCount" resultType="java.util.Map">
...@@ -54,14 +55,15 @@ ...@@ -54,14 +55,15 @@
</select> </select>
<select id="userCountNew" resultType="java.util.Map"> <select id="userCountNew" resultType="java.util.Map">
SELECT SELECT
tui.post tui.new_post
FROM FROM
( SELECT org_code FROM privilege_company WHERE company_code = #{screenDto.cityCode} ) AS subquery ( SELECT org_code FROM privilege_company WHERE company_code = #{screenDto.cityCode} ) AS subquery
INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( subquery.org_code, '%' ) INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( subquery.org_code, '%' )
INNER JOIN tzs_user_info tui ON bi.use_code = tui.unit_code INNER JOIN tzs_user_info tui ON bi.use_code = tui.unit_code
WHERE WHERE
bi.unit_type IS NOT NULL bi.unit_type IS NOT NULL
AND tui.post IS NOT NULL AND tui.new_post IS NOT NULL
AND tui.is_delete = 'f'
<if test="unitTypeList != null and unitTypeList.size() > 0"> <if test="unitTypeList != null and unitTypeList.size() > 0">
AND AND
<foreach collection="unitTypeList" item="unitType" open="(" separator="OR" close=")"> <foreach collection="unitTypeList" item="unitType" open="(" separator="OR" close=")">
......
...@@ -372,6 +372,8 @@ public class AQZSDPStatisticsServiceImpl { ...@@ -372,6 +372,8 @@ public class AQZSDPStatisticsServiceImpl {
countItemDto.setCzjc("0"); countItemDto.setCzjc("0");
countItemDto.setCzjchege("0"); countItemDto.setCzjchege("0");
countItemDto.setJianyanchaoqi("0"); countItemDto.setJianyanchaoqi("0");
countItemDto.setRyhg("0");
countItemDto.setSjhg("0");
} }
public Map<String, Object> mainBodyCount(DPFilterParamDto dpFilterParamDto) { public Map<String, Object> mainBodyCount(DPFilterParamDto dpFilterParamDto) {
......
...@@ -467,11 +467,11 @@ public class CylinderDPStatisticsServiceImpl { ...@@ -467,11 +467,11 @@ public class CylinderDPStatisticsServiceImpl {
private Map<String,Object> getStationRate(String orgCode,Map<String,Object> result){ private Map<String,Object> getStationRate(String orgCode,Map<String,Object> result){
// 气站总数 // 气站总数
Long totalNum = cylinderStatisticsMapper.countEnterpriseNumForCylinder(orgCode); Long totalNum = null == orgCode ? null : cylinderStatisticsMapper.countEnterpriseNumForCylinder(orgCode);
// 已对接总数(存在充装业务数据的企业则认为已对接) // 已对接总数(存在充装业务数据的企业则认为已对接)
Long count = cylinderStatisticsMapper.countEnterpriseUsed(orgCode); Long count = null == orgCode ? null : cylinderStatisticsMapper.countEnterpriseUsed(orgCode);
if (totalNum != null && count != null) { if (totalNum != null && count != null && totalNum > 0 ) {
BigDecimal percent = (new BigDecimal(count.doubleValue() * 100).divide(new BigDecimal(totalNum.doubleValue()), 2, RoundingMode.HALF_UP)); BigDecimal percent = (new BigDecimal(count.doubleValue() * 100).divide(new BigDecimal(totalNum.doubleValue()), 2, RoundingMode.HALF_UP));
result.put("stationRate", Double.valueOf(percent.toString())); result.put("stationRate", Double.valueOf(percent.toString()));
} else { } else {
......
...@@ -2673,6 +2673,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -2673,6 +2673,7 @@ public class JGDPStatisticsServiceImpl {
if(!ValidationUtil.isEmpty(registerInfo.getUseOrgCode())){ if(!ValidationUtil.isEmpty(registerInfo.getUseOrgCode())){
Optional<JgUseRegistrationManage> firstRecord = jgUseRegistrationManageMapper.selectList(new QueryWrapper<JgUseRegistrationManage>().lambda() Optional<JgUseRegistrationManage> firstRecord = jgUseRegistrationManageMapper.selectList(new QueryWrapper<JgUseRegistrationManage>().lambda()
.eq(JgUseRegistrationManage::getUseRegistrationCode, registerInfo.getUseOrgCode()) .eq(JgUseRegistrationManage::getUseRegistrationCode, registerInfo.getUseOrgCode())
.eq(JgUseRegistrationManage::getIsDelete, 0)
.orderByDesc(JgUseRegistrationManage::getRecDate)).stream().findFirst(); .orderByDesc(JgUseRegistrationManage::getRecDate)).stream().findFirst();
firstRecord.ifPresent(jgUseRegistrationManage -> { firstRecord.ifPresent(jgUseRegistrationManage -> {
......
...@@ -565,7 +565,7 @@ public class ZLDPStatisticsServiceImpl { ...@@ -565,7 +565,7 @@ public class ZLDPStatisticsServiceImpl {
List<Map<String, String>> list = screenMapper.userCountNew(screenDto, unitTypeList); List<Map<String, String>> list = screenMapper.userCountNew(screenDto, unitTypeList);
Map<String, Integer> dataMap = new HashMap<>(); Map<String, Integer> dataMap = new HashMap<>();
for (Map<String, String> map : list) { for (Map<String, String> map : list) {
JSONArray jsonArray = JSONArray.parseArray(map.get("post")); JSONArray jsonArray = JSONArray.parseArray(map.get("new_post"));
for(int j = 0; j < jsonArray.size(); j++){ for(int j = 0; j < jsonArray.size(); j++){
dataMap.put(jsonArray.getString(j), dataMap.getOrDefault(jsonArray.getString(j), 0) + 1); dataMap.put(jsonArray.getString(j), dataMap.getOrDefault(jsonArray.getString(j), 0) + 1);
} }
......
...@@ -19,7 +19,7 @@ public enum EquipmentClassifityEnum { ...@@ -19,7 +19,7 @@ public enum EquipmentClassifityEnum {
QZJX("起重机械","4000"), QZJX("起重机械","4000"),
CC("场(厂)内专用机动车辆","5000"), CC("场(厂)内专用机动车辆","5000"),
YLSS("大型游乐设施","6000"), YLSS("大型游乐设施","6000"),
KYSD("压力管道元件","9000"), KYSD("客运索道","9000"),
YLGD("压力管道","8000"), YLGD("压力管道","8000"),
QP("气瓶","2300"), QP("气瓶","2300"),
......
...@@ -656,7 +656,7 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -656,7 +656,7 @@ public class TzBaseEnterpriseInfoServiceImpl
tzBaseEnterpriseInfo.setDistrict(addressList.get(2)); tzBaseEnterpriseInfo.setDistrict(addressList.get(2));
tzBaseEnterpriseInfo.setCommunity(ObjectUtils.isEmpty(map.get("community")) ? null : String.valueOf(map.get("community"))); tzBaseEnterpriseInfo.setCommunity(ObjectUtils.isEmpty(map.get("community")) ? null : String.valueOf(map.get("community")));
tzBaseEnterpriseInfo.setStreet(ObjectUtils.isEmpty(map.get("street")) ? null : String.valueOf(map.get("street"))); tzBaseEnterpriseInfo.setStreet(ObjectUtils.isEmpty(map.get("street")) ? null : String.valueOf(map.get("street")));
tzBaseEnterpriseInfo.setAddress(ObjectUtils.isEmpty(map.get("regAddress")) ? null : String.valueOf(map.get("regAddress"))); // tzBaseEnterpriseInfo.setAddress(ObjectUtils.isEmpty(map.get("regAddress")) ? null : String.valueOf(map.get("regAddress")));
tzBaseEnterpriseInfo.setLegalPerson(ObjectUtils.isEmpty(map.get("legalPerson")) ? null : String.valueOf(map.get("legalPerson"))); tzBaseEnterpriseInfo.setLegalPerson(ObjectUtils.isEmpty(map.get("legalPerson")) ? null : String.valueOf(map.get("legalPerson")));
regUnitIc.setIndustryName(ObjectUtils.isEmpty(map.get("industryName")) ? null : String.valueOf(map.get("industryName"))); regUnitIc.setIndustryName(ObjectUtils.isEmpty(map.get("industryName")) ? null : String.valueOf(map.get("industryName")));
DataDictionary regOrganCodeDict = iDataDictionaryService.getByCode(String.valueOf(map.get("registeredOrganCode")),"DJJG"); DataDictionary regOrganCodeDict = iDataDictionaryService.getByCode(String.valueOf(map.get("registeredOrganCode")),"DJJG");
...@@ -682,9 +682,7 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -682,9 +682,7 @@ public class TzBaseEnterpriseInfoServiceImpl
// 企业信息变更-同步修改企业下人员绑定设备类型 // 企业信息变更-同步修改企业下人员绑定设备类型
ArrayList<String> newData = new ArrayList<>(); ArrayList<String> newData = new ArrayList<>();
JSONArray objects = JSON.parseArray(tzBaseEnterpriseInfo.getEquipCategory()); JSONArray objects = JSON.parseArray(tzBaseEnterpriseInfo.getEquipCategory());
objects.forEach(item ->{ objects.forEach(item -> newData.add(item.toString()));
newData.add(item.toString());
});
boolean b = tzBaseEnterpriseInfoService.updateById(tzBaseEnterpriseInfo); boolean b = tzBaseEnterpriseInfoService.updateById(tzBaseEnterpriseInfo);
if (b) { if (b) {
try { try {
......
...@@ -130,4 +130,10 @@ public class IdxBizJgOtherInfo extends TzsBaseEntity { ...@@ -130,4 +130,10 @@ public class IdxBizJgOtherInfo extends TzsBaseEntity {
@TableField(value = "\"CYLINDER_STAMP_ATTACHMENT\"") @TableField(value = "\"CYLINDER_STAMP_ATTACHMENT\"")
private String cylinderStampAttachment; private String cylinderStampAttachment;
/**
* 96333码类型,类型手工输入(1)、系统自动生成(2)(历史登记时使用),默认2
*/
@TableField("\"CODE96333_TYPE\"")
private String code96333Type;
} }
...@@ -49,4 +49,13 @@ public enum EquipmentClassifityEnum { ...@@ -49,4 +49,13 @@ public enum EquipmentClassifityEnum {
} }
return ""; return "";
} }
public static EquipmentClassifityEnum getOne(String code){
for (EquipmentClassifityEnum value : EquipmentClassifityEnum.values()) {
if (value.getCode().equals(code)){
return value;
}
}
return null;
}
} }
...@@ -58,4 +58,6 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI ...@@ -58,4 +58,6 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI
Boolean updateCylinderCategoryByEquCodeBatch(@Param("cylinderCategory") String cylinderCategory, @Param("equCodeList") List<String> equCodeList); Boolean updateCylinderCategoryByEquCodeBatch(@Param("cylinderCategory") String cylinderCategory, @Param("equCodeList") List<String> equCodeList);
Integer selectByEquCodeAndClaimStatus(@Param("equCode") String equCode, @Param("sequenceNbr") String sequenceNbr); Integer selectByEquCodeAndClaimStatus(@Param("equCode") String equCode, @Param("sequenceNbr") String sequenceNbr);
Integer selectInstallNoticeEqByEquCode(@Param("equCode") String equCode, @Param("sequenceNbr") String sequenceNbr);
} }
...@@ -29,6 +29,16 @@ ...@@ -29,6 +29,16 @@
AND joi.claim_status = '已认领' AND joi.claim_status = '已认领'
</select> </select>
<select id="selectInstallNoticeEqByEquCode" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM tzs_jg_installation_notice_eq tjine
JOIN idx_biz_jg_register_info ibjri ON ibjri.record = tjine.equ_id
WHERE ibjri.equ_code = #{equCode}
<if test="sequenceNbr != null and sequenceNbr != ''">
AND ibjri.sequence_nbr != #{sequenceNbr}
</if>
</select>
<update id="updateCylinderCategoryByRecordBatch"> <update id="updateCylinderCategoryByRecordBatch">
UPDATE idx_biz_jg_register_info UPDATE idx_biz_jg_register_info
SET "CYLINDER_CATEGORY" = #{cylinderCategory} SET "CYLINDER_CATEGORY" = #{cylinderCategory}
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
tz_base_enterprise_info bi tz_base_enterprise_info bi
WHERE WHERE
tui.unit_code = bi.use_code tui.unit_code = bi.use_code
and tui.post LIKE concat ('%', #{post}, '%') and tui.new_post LIKE concat ('%', #{post}, '%')
and ((bi.supervise_org_code != '50' and bi.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (bi.supervise_org_code = '50' and bi.office_region LIKE CONCAT ('%', #{regionCode}, '%'))) and ((bi.supervise_org_code != '50' and bi.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (bi.supervise_org_code = '50' and bi.office_region LIKE CONCAT ('%', #{regionCode}, '%')))
and tui.is_delete=false and tui.is_delete=false
</select> </select>
......
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