Commit f4ddd84b authored by 刘林's avatar 刘林

fix(jg):装置添加投入日期,设备种类添加新接口

parent 78a88228
...@@ -196,6 +196,31 @@ public class CommonController extends BaseController { ...@@ -196,6 +196,31 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse(commonService.equipmentClassification(type)); return ResponseHelper.buildResponse(commonService.equipmentClassification(type));
} }
/**
* 设备分类 去掉管道分类
*
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipmentClassificationNoPipeline")
@ApiOperation(httpMethod = "GET", value = "设备分类", notes = "1,设备种类 2,设备类别 3,设备品种")
public ResponseModel<List<EquipmentCategoryDto>> equipmentClassificationNoPipeline(@RequestParam(value = "type") String type) {
return ResponseHelper.buildResponse(commonService.equipmentClassificationNoPipeline(type));
}
/**
* 设备品种
*
* @param parentId 父级ID
* @return list
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getEquDefineByParentId")
@ApiOperation(httpMethod = "GET", value = "根据父级ID查询设备品种", notes = "根据父级ID查询设备品种")
public ResponseModel<List<EquipmentCategoryDto>> getEquDefineByParentId(@RequestParam(value = "parentId") String parentId) {
return ResponseHelper.buildResponse(commonService.getEquDefineByParentId(parentId));
}
/** /**
* 查询安全管理员的基本信息 * 查询安全管理员的基本信息
......
...@@ -237,4 +237,8 @@ public interface ICommonService { ...@@ -237,4 +237,8 @@ public interface ICommonService {
* @return * @return
*/ */
Boolean useRegistrationCertificateAccountUnique(String useRegistrationCode, String equipId); Boolean useRegistrationCertificateAccountUnique(String useRegistrationCode, String equipId);
List<EquipmentCategoryDto> equipmentClassificationNoPipeline(String type);
List<EquipmentCategoryDto> getEquDefineByParentId(String parentId);
} }
...@@ -2074,6 +2074,28 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2074,6 +2074,28 @@ public class CommonServiceImpl implements ICommonService {
return result; return result;
} }
@Override
public List<EquipmentCategoryDto> equipmentClassificationNoPipeline(String type) {
List<EquipmentCategoryDto> categoryList = equipmentCategoryMapper.selectClassifyNoStart7And8();
List<EquipmentCategoryDto> result = Collections.emptyList();
switch (type) {
case "1":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
case "2":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
case "3":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*0$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
}
return result;
}
@Override
public List<EquipmentCategoryDto> getEquDefineByParentId(String parentId) {
return equipmentCategoryMapper.getEquDefineByParentId(parentId);
}
/** /**
* 排序 :页面列表排序功能支持,将 "字段,ascend" 或 "字段,descend" 转化为对应JSONObject * 排序 :页面列表排序功能支持,将 "字段,ascend" 或 "字段,descend" 转化为对应JSONObject
......
...@@ -392,7 +392,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -392,7 +392,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String dataSource = (String) equipmentInfoForm.get(DATA_SOURCE); String dataSource = (String) equipmentInfoForm.get(DATA_SOURCE);
String equCategory = (String) equipmentInfoForm.get(EQU_CATEGORY); String equCategory = (String) equipmentInfoForm.get(EQU_CATEGORY);
//管道添加设备 //管道添加设备
if ("8300".equals(equCategory)) { if (PipelineEnum.INDUSTRIAL_PIPELINE.getCode().equals(equCategory)) {
return this.pipelineEquipCreateOrUpdate(paramMap); return this.pipelineEquipCreateOrUpdate(paramMap);
} }
if(dataSource.contains("black")){ if(dataSource.contains("black")){
......
...@@ -1079,6 +1079,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1079,6 +1079,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
IdxBizJgProjectContraption jgProjectContraption = jgProjectContraptionService.getById(jgUseRegistration.getProjectContraptionId()); IdxBizJgProjectContraption jgProjectContraption = jgProjectContraptionService.getById(jgUseRegistration.getProjectContraptionId());
jgUseRegistration.setProjectContraption(jgProjectContraption.getProjectContraption()); jgUseRegistration.setProjectContraption(jgProjectContraption.getProjectContraption());
jgProjectContraption.setUseRegistrationCode(jgUseRegistration.getUseRegistrationCode()); jgProjectContraption.setUseRegistrationCode(jgUseRegistration.getUseRegistrationCode());
jgProjectContraption.setUseDate(String.valueOf(jgUseRegistration.getAuditPassDate()));
jgProjectContraptionService.updateById(jgProjectContraption); jgProjectContraptionService.updateById(jgProjectContraption);
} }
} }
......
...@@ -123,4 +123,7 @@ public class IdxBizJgProjectContraptionDto extends BaseDto { ...@@ -123,4 +123,7 @@ public class IdxBizJgProjectContraptionDto extends BaseDto {
@ApiModelProperty("设备代码") @ApiModelProperty("设备代码")
private String equCode; private String equCode;
@ApiModelProperty("投入日期")
private String useDate;
} }
...@@ -256,4 +256,10 @@ public class IdxBizJgProjectContraption extends BaseEntity { ...@@ -256,4 +256,10 @@ public class IdxBizJgProjectContraption extends BaseEntity {
*/ */
@TableField("equ_code") @TableField("equ_code")
private String equCode; private String equCode;
/**
* 投入日期
*/
@TableField("USE_DATE")
private String useDate;
} }
...@@ -23,9 +23,12 @@ import java.util.Map; ...@@ -23,9 +23,12 @@ import java.util.Map;
@Mapper @Mapper
public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' AND code NOT LIKE '8%' ORDER BY parent_id") @Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' ORDER BY parent_id")
List<EquipmentCategoryDto> selectClassifyNoStart7(); List<EquipmentCategoryDto> selectClassifyNoStart7();
@Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' AND code NOT LIKE '8%' ORDER BY parent_id")
List<EquipmentCategoryDto> selectClassifyNoStart7And8();
@Select("select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')") @Select("select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')")
List<EquipmentCategoryDto> selectClassify(); List<EquipmentCategoryDto> selectClassify();
...@@ -95,5 +98,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -95,5 +98,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
List<String> selectXiXianNew(); List<String> selectXiXianNew();
@Select("SELECT * FROM tz_equipment_category WHERE parent_id = #{parentId}")
List<EquipmentCategoryDto> getEquDefineByParentId(String parentId);
} }
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
SUPERVISORY_CODE, SUPERVISORY_CODE,
PROVINCE_NAME, PROVINCE_NAME,
DATA_SOURCE, DATA_SOURCE,
USE_UNIT_NAME USE_UNIT_NAME,
USE_DATE
FROM FROM
IDX_BIZ_JG_PROJECT_CONTRAPTION ibjpc IDX_BIZ_JG_PROJECT_CONTRAPTION ibjpc
WHERE WHERE
......
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