Commit 1c513e0d authored by yangyang's avatar yangyang

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

# Conflicts: # amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
parents 8aed6bf4 a4225611
......@@ -3,11 +3,11 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jg.biz.dao.ESElavtorRepository;
import com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgDesignInfoService;
......@@ -38,7 +38,6 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgTechParamsElevatorMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import org.apache.lucene.queryparser.classic.QueryParser;
......@@ -54,15 +53,16 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.IOException;
import java.lang.reflect.Field;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
......@@ -163,7 +163,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
/**
* 删除设备注册信息(批量删除)
*
* @param sequenceNbrList
* @param map
* @return
*/
public boolean batchDeleteByRecord(Map<String, Object> map) {
......@@ -204,63 +204,117 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//使用信息
IdxBizJgUseInfo useInfo = idxBizJgUseInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(useInfo)) {
Map<String, Object> useInfoMap = Bean.BeantoMap(useInfo);
Map<String, Object> useInfoMap = new HashMap<>();
String[] fields = null;
try {
useInfoMap = this.convertCamelToUnderscore(useInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
useInfoMap.put("USEINFO_SEQ", useInfo.getSequenceNbr());
objMap.putAll(useInfoMap);
}
//设计制造
IdxBizJgDesignInfo designInfo = iIdxBizJgDesignInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(designInfo)) {
Map<String, Object> designInfoMap = Bean.BeantoMap(designInfo);
Map<String, Object> designInfoMap = new HashMap<>();
String[] fields = {"DESIGN_DOC", "DESIGN_STANDARD"};
try {
designInfoMap = this.convertCamelToUnderscore(designInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
designInfoMap.put("DESIGNINFO_SEQ", designInfo.getSequenceNbr());
objMap.putAll(designInfoMap);
}
//制造信息
IdxBizJgFactoryInfo factoryInfo = iIdxBizJgFactoryInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(factoryInfo)) {
Map<String, Object> factoryInfoMap = Bean.BeantoMap(factoryInfo);
Map<String, Object> factoryInfoMap = new HashMap<>();
String[] fields = {"FACTORY_STANDARD", "PRODUCT_QUALITY_YIELD_PROVE", "INS_USE_MAINTAIN_EXPLAIN"};
try {
factoryInfoMap = this.convertCamelToUnderscore(factoryInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
factoryInfoMap.put("FACTORYINFO_SEQ", factoryInfo.getSequenceNbr());
objMap.putAll(factoryInfoMap);
}
//施工信息
IdxBizJgConstructionInfo constructionInfo = iIdxBizJgConstructionInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(constructionInfo)) {
Map<String, Object> constructionInfoMap = Bean.BeantoMap(constructionInfo);
Map<String, Object> constructionInfoMap = new HashMap<>();
String[] fields = null;
try {
constructionInfoMap = this.convertCamelToUnderscore(constructionInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
constructionInfoMap.put("CONSTRUCTIONINFO_SEQ", constructionInfo.getSequenceNbr());
objMap.putAll(constructionInfoMap);
}
//注册登记
IdxBizJgRegisterInfo registerInfo = this.getOne(new QueryWrapper<IdxBizJgRegisterInfo>().eq("RECORD", record));
if (!ValidationUtil.isEmpty(registerInfo)) {
Map<String, Object> registerInfoMap = Bean.BeantoMap(registerInfo);
Map<String, Object> registerInfoMap = new HashMap<>();
String[] fields = {"PRODUCT_PHOTO"};
try {
registerInfoMap = this.convertCamelToUnderscore(registerInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
registerInfoMap.put("REGISTERINFO_SEQ", registerInfo.getSequenceNbr());
objMap.putAll(registerInfoMap);
}
//维保备案
IdxBizJgMaintenanceRecordInfo maintenanceRecordInfo = iIdxBizJgMaintenanceRecordInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(maintenanceRecordInfo)) {
Map<String, Object> maintenanceRecordInfoMap = Bean.BeantoMap(maintenanceRecordInfo);
Map<String, Object> maintenanceRecordInfoMap = new HashMap<>();
String[] fields = null;
try {
maintenanceRecordInfoMap = this.convertCamelToUnderscore(maintenanceRecordInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
maintenanceRecordInfoMap.put("MAINTENANCERECORDINFO_SEQ", maintenanceRecordInfo.getSequenceNbr());
objMap.putAll(maintenanceRecordInfoMap);
}
//监督管理
IdxBizJgSupervisionInfo supervisionInfo = iIdxBizJgSupervisionInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(supervisionInfo)) {
Map<String, Object> supervisionInfoMap = Bean.BeantoMap(supervisionInfo);
Map<String, Object> supervisionInfoMap = new HashMap<>();
String[] fields = null;
try {
supervisionInfoMap = this.convertCamelToUnderscore(supervisionInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
supervisionInfoMap.put("SUPERVISIONINFO_SEQ", supervisionInfo.getSequenceNbr());
objMap.putAll(supervisionInfoMap);
}
//其他信息
IdxBizJgOtherInfo otherInfo = iIdxBizJgOtherInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(otherInfo)) {
Map<String, Object> otherInfoMap = Bean.BeantoMap(otherInfo);
Map<String, Object> otherInfoMap = new HashMap<>();
String[] fields = null;
try {
otherInfoMap = this.convertCamelToUnderscore(otherInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
otherInfoMap.put("OTHERINFO_SEQ", otherInfo.getSequenceNbr());
objMap.putAll(otherInfoMap);
}
//检验检测
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = iIdxBizJgInspectionDetectionInfoService.getOneData(record);
if (!ValidationUtil.isEmpty(inspectionDetectionInfo)) {
Map<String, Object> inspectionDetectionInfoMap = Bean.BeantoMap(inspectionDetectionInfo);
Map<String, Object> inspectionDetectionInfoMap = new HashMap<>();
String[] fields = {"INSPECT_REPORT"};
try {
inspectionDetectionInfoMap = this.convertCamelToUnderscore(inspectionDetectionInfo, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
inspectionDetectionInfoMap.put("INSPECTIONDETECTIONINFO_SEQ", inspectionDetectionInfo.getSequenceNbr());
objMap.putAll(inspectionDetectionInfoMap);
}
......@@ -268,7 +322,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//电梯
IdxBizJgTechParamsElevator elevator = iIdxBizJgTechParamsElevatorService.getOneData(record);
if (!ValidationUtil.isEmpty(elevator)) {
Map<String, Object> elevatorMap = Bean.BeantoMap(elevator);
Map<String, Object> elevatorMap = new HashMap<>();
String[] fields = {"EXPLOSIONPROOF_SIGN_COMPLETE"};
try {
elevatorMap = this.convertCamelToUnderscore(elevator, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
elevatorMap.put("ELEVATOR_SEQ", elevator.getSequenceNbr());
objMap.putAll(elevatorMap);
}
......@@ -283,14 +343,26 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//主要零部件
IdxBizJgMainParts mainParts = iIdxBizJgMainPartsService.getOneData(record);
if (!ValidationUtil.isEmpty(mainParts)) {
Map<String, Object> mainPartsMap = Bean.BeantoMap(mainParts);
Map<String, Object> mainPartsMap = new HashMap<>();
String[] fields = null;
try {
mainPartsMap = this.convertCamelToUnderscore(mainParts, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
mainPartsMap.put("MAINPARTS_SEQ", mainParts.getSequenceNbr());
objMap.putAll(mainPartsMap);
}
//安全附件
IdxBizJgProtectionDevices protectionDevices = iIdxBizJgProtectionDevicesService.getOneData(record);
if (!ValidationUtil.isEmpty(protectionDevices)) {
Map<String, Object> protectionDevicesMap = Bean.BeantoMap(protectionDevices);
Map<String, Object> protectionDevicesMap = new HashMap<>();
String[] fields = null;
try {
protectionDevicesMap = this.convertCamelToUnderscore(protectionDevices, fields);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
protectionDevicesMap.put("PROTECTIONDEVICES_SEQ", protectionDevices.getSequenceNbr());
objMap.putAll(protectionDevicesMap);
}
......@@ -367,22 +439,22 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// //查询 安装告知【可告知设备列表】【EQU_STATE===""】
if (!ObjectUtils.isEmpty(queryType) && ValidationUtil.equals(queryType, "AZ")) {
BoolQueryBuilder azBuilder = QueryBuilders.boolQuery();
azBuilder.mustNot(QueryBuilders.existsQuery("EQU_STATE"));
azBuilder.must(QueryBuilders.matchQuery("EQU_STATE", 9999));
boolMust.must(azBuilder);
}
//查询 维保备案【可绑定设备列表】【EQU_STATE==="" && INSPECT_REPORT!==9999(默认占位值)】
if (!ObjectUtils.isEmpty(queryType) && ValidationUtil.equals(queryType, "WB")) {
BoolQueryBuilder wbBuilder = QueryBuilders.boolQuery();
wbBuilder.mustNot(QueryBuilders.existsQuery("EQU_STATE"));
wbBuilder.mustNot(QueryBuilders.matchQuery("INSPECT_REPORT", 9999));
wbBuilder.must(QueryBuilders.matchQuery("EQU_STATE", 9999));
wbBuilder.mustNot(QueryBuilders.existsQuery("INSPECT_REPORT"));
boolMust.must(wbBuilder);
}
//查询 使用登记【可选设备列表】【EQU_STATUS==="" && INSPECT_REPORT!==9999(默认占位值) && USE_ORG_CODE!=="" 】
if (!ObjectUtils.isEmpty(queryType) && ValidationUtil.equals(queryType, "SY")) {
BoolQueryBuilder syBuilder = QueryBuilders.boolQuery();
syBuilder.mustNot(QueryBuilders.existsQuery("EQU_STATE"));
syBuilder.mustNot(QueryBuilders.matchQuery("INSPECT_REPORT", 9999));
syBuilder.mustNot(QueryBuilders.matchQuery("USE_ORG_CODE", ""));
syBuilder.must(QueryBuilders.matchQuery("EQU_STATE", 9999));
syBuilder.mustNot(QueryBuilders.existsQuery("INSPECT_REPORT"));
syBuilder.mustNot(QueryBuilders.existsQuery("USE_ORG_CODE"));
boolMust.must(syBuilder);
}
......@@ -455,7 +527,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String record = null;
LinkedHashMap equipmentInfoForm = (LinkedHashMap) map.get(EQUIPMENT_INFO_FORM_ID);
//操作类型
String operateType = ValidationUtil.isEmpty(String.valueOf(equipmentInfoForm.get("SEQUENCE_NBR"))) ? OPERATESAVE : OPERATEEDIT;
String operateType = ValidationUtil.isEmpty(equipmentInfoForm.get("SEQUENCE_NBR")) ? OPERATESAVE : OPERATEEDIT;
record = OPERATESAVE.equals(operateType) ? UUID.randomUUID().toString() : equipmentInfoForm.get("RECORD").toString();
//使用信息
......@@ -616,4 +688,27 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
/**
* 将对象的属性由驼峰转为纯大写下划线格式
*
* @param object
* @return
* @throws IllegalAccessException
*/
public static Map<String, Object> convertCamelToUnderscore(Object object, String[] strToJsonArrayFields) throws IllegalAccessException {
Map<String, Object> result = new HashMap<>();
Class<?> clazz = object.getClass();
for (Field field : clazz.getDeclaredFields()) {
field.setAccessible(true);
String fieldName = field.getName();
String underscoreFieldName = StringUtils.camelToUnderline(fieldName).toUpperCase();
Object value = field.get(object);
//需要转为jsonArray的字段
if (!ValidationUtil.isEmpty(strToJsonArrayFields) && Arrays.asList(strToJsonArrayFields).contains(underscoreFieldName)) {
value = JSON.parseArray((String) field.get(object));
}
result.put(underscoreFieldName.toUpperCase(), value);
}
return result;
}
}
\ No newline at end of file
......@@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface JyjcInspectionApplicationPushLogMapper extends BaseMapper<JyjcInspectionApplicationPushLog> {
void deleteByApplicationSeq(Long seq);
}
......@@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface JyjcInspectionEquipStatisticsMapper extends BaseMapper<JyjcInspectionEquipStatistics> {
void deleteByApplicationSeq(Long seq);
}
package com.yeejoin.amos.boot.module.jyjc.api.service;
import java.util.List;
/**
* 接口类
*
* @author system_generator
* @date 2023-12-14
*/
public interface IJyjcInspectionApplicationService {}
public interface IJyjcInspectionApplicationService {
void deleteBatchData(List<Long> sequenceNbr);
}
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jyjc.api.service;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam;
import java.util.List;
import java.util.Map;
/**
* 检验结果技术参数表接口类
......@@ -17,4 +18,11 @@ public interface IJyjcInspectionResultParamService {
* @return
*/
List<JyjcInspectionResultParam> getParamByResultSeq(Long sequenceNbr);
/**
* 根据设备code获取技术参数字段
* @param equipTypeCode 设备code
* @return 字段列表
*/
List<Map<String,Object>> getParamByEquipTypeCode(String equipTypeCode);
}
package com.yeejoin.amos.boot.module.jyjc.api.service;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -18,4 +21,12 @@ public interface IJyjcInspectionResultService {
* @return 检验结果实体
*/
Map<String, Object> queryDetailBySeq(Long sequenceNbr);
/**
* 获取设备种类
* @param type 获取的类型
* @param notNode 不需要节点
* @return 列表
*/
List<Map<String,Object>> equipList(String type, String notNode);
}
......@@ -2,4 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationPushLogMapper">
<delete id="deleteByApplicationSeq">
delete
*
from
tz_jyjc_inspection_application_push_log
where
application_seq = #{applicationSeq}
</delete>
</mapper>
......@@ -2,4 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionEquipStatisticsMapper">
<delete id="deleteByApplicationSeq">
delete
*
from
tz_jyjc_inspection_equip_statistics
where
application_seq = #{applicationSeq}
</delete>
</mapper>
package com.yeejoin.amos.boot.module.jyjc.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
*
* @author system_generator
* @date 2023-12-13
*/
......@@ -39,9 +24,8 @@ import java.util.stream.Collectors;
@RequestMapping(value = "/common")
public class CommonController extends BaseController {
@Autowired
CommonserviceImpl commonserviceImpl;
@Autowired
CommonserviceImpl commonserviceImpl;
/**
* 新增
......@@ -49,10 +33,21 @@ public class CommonController extends BaseController {
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/getJyjcPersonByUnitCode")
@ApiOperation(httpMethod = "GET", value = "根据公司的unitCode获取检测检验人员列表", notes = "根据公司的unitCode获取检测检验人员列表")
public ResponseModel<List<TzsUserInfo>> getUserInfosByUnitCode(@RequestParam String unitCode) {
return ResponseHelper.buildResponse(commonserviceImpl.getUserInfosByUnitCode(unitCode));
}
@PostMapping(value = "/getJyjcPersonByUnitCode")
@ApiOperation(httpMethod = "GET", value = "根据公司的unitCode获取检测检验人员列表", notes = "根据公司的unitCode获取检测检验人员列表")
public ResponseModel<List<TzsUserInfo>> getUserInfosByUnitCode(@RequestParam String unitCode) {
return ResponseHelper.buildResponse(commonserviceImpl.getUserInfosByUnitCode(unitCode));
}
/**
* 查询检验检测机构列表(基本信息及联系人)
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getInspectionUnitList")
@ApiOperation(httpMethod = "GET", value = "查询检验检测机构列表(基本信息及联系人)", notes = "查询检验检测机构列表(基本信息及联系人)")
public ResponseModel<List<TzBaseEnterpriseInfo>> getInspectionUnitList() {
return ResponseHelper.buildResponse(commonserviceImpl.getInspectionUnitList());
}
}
......@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.enums.DocumentEnum;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationAttachmentModel;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationAttachmentServiceImpl;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationEquipServiceImpl;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationPushLogServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
......@@ -60,12 +61,7 @@ public class JyjcInspectionApplicationController extends BaseController {
@Autowired
JyjcInspectionApplicationServiceImpl jyjcInspectionApplicationServiceImpl;
@Autowired
JyjcInspectionApplicationAttachmentServiceImpl jyjcInspectionApplicationAttachmentService;
@Autowired
JyjcInspectionApplicationEquipServiceImpl jyjcInspectionApplicationEquipService;
@Autowired
WorkflowFeignService workflowFeignService;
/**
* 新增
......@@ -77,81 +73,7 @@ public class JyjcInspectionApplicationController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<JyjcInspectionApplicationModel> save(@RequestBody JyjcInspectionApplicationModel model) {
//开启报检流程工作流
if ( !model.getOperationType().equals("2")){
if (model.getOperationType().equals("0")){
JSONObject body = new JSONObject();
String businessKey = buildOrderNo();
body.put(WorkFlowEnum.BUSINESSKEY.getCode(), businessKey);
body.put(WorkFlowEnum.processDefinitionKey.getCode(), model.getProcessKey());
JSONObject jsonObject = workflowFeignService.startProcess(body);
String processId = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("result"))).getString("id");
model.setProcessInstanceId(processId);
model.setStatus("已提交");
}else if ( model.getOperationType().equals("1")){
model.setStatus("草稿");
}
model = jyjcInspectionApplicationServiceImpl.createWithModel(model);
//保存报检装备监管码
if ( model.getEquip().size() > 0){
List<Map<String, Object>> equip = model.getEquip();
List<String> jgm = equip.stream().map(e -> e.get("equipUnicode").toString()).collect(Collectors.toList());
for (String s : jgm) {
JyjcInspectionApplicationEquip equipInfo = new JyjcInspectionApplicationEquip();
equipInfo.setApplicationSeq(model.getSequenceNbr());
equipInfo.setEquipUnicode(s);
jyjcInspectionApplicationEquipService.save(equipInfo);
}
}
Map<String, Object> map = BeanUtil.beanToMap(model);
// 附件保存
List<String> enumNameList = DocumentEnum.getEnumNameList();
List<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>();
for (String code : enumNameList) {
if (map.containsKey(code)){
JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment();
attachments.setAttachmentType(code);
attachments.setAttachmentUrl(JSONObject.toJSONString(map.get(code)));
attachments.setApplicationSeq(model.getSequenceNbr());
jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments);
}
}
}else {
//更新报检装备监管码
jyjcInspectionApplicationEquipService.getBaseMapper().deleteByApplicationSeq(model.getSequenceNbr());
if ( model.getEquip().size() > 0){
List<Map<String, Object>> equip = model.getEquip();
List<String> jgm = equip.stream().map(e -> e.get("equipUnicode").toString()).collect(Collectors.toList());
for (String s : jgm) {
JyjcInspectionApplicationEquip equipInfo = new JyjcInspectionApplicationEquip();
equipInfo.setApplicationSeq(model.getSequenceNbr());
equipInfo.setEquipUnicode(s);
jyjcInspectionApplicationEquipService.save(equipInfo);
}
}
Map<String, Object> map = BeanUtil.beanToMap(model);
// 附件更新
List<String> enumNameList = DocumentEnum.getEnumNameList();
List<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>();
jyjcInspectionApplicationAttachmentService.getBaseMapper().deleteByApplicationSeq(model.getSequenceNbr());
for (String code : enumNameList) {
if (map.containsKey(code)){
JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment();
attachments.setAttachmentType(code);
attachments.setAttachmentUrl(JSONObject.toJSONString(map.get(code)));
attachments.setApplicationSeq(model.getSequenceNbr());
jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments);
}
}
model.setStatus("已提交");
jyjcInspectionApplicationServiceImpl.updateWithModel(model);
}
return ResponseHelper.buildResponse(model);
return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.save(model));
}
......@@ -167,7 +89,6 @@ public class JyjcInspectionApplicationController extends BaseController {
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<JyjcInspectionApplicationModel> updateBySequenceNbrJyjcInspectionApplication(@RequestBody JyjcInspectionApplicationModel model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.updateWithModel(model));
}
......@@ -185,6 +106,25 @@ public class JyjcInspectionApplicationController extends BaseController {
return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/deleteBatch")
@ApiOperation(httpMethod = "DELETE", value = "批量删除", notes = "批量删除")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, List<Long>sequenceNbr){
jyjcInspectionApplicationServiceImpl.deleteBatchData(sequenceNbr);
return ResponseHelper.buildResponse(jyjcInspectionApplicationServiceImpl.deleteBatchSeq(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
......
......@@ -148,4 +148,17 @@ public class JyjcInspectionResultController extends BaseController {
public ResponseModel<JyjcInspectionResultModel> updateJyjcInspectionResult(@RequestBody JyjcInspectionResultModel model) {
return ResponseHelper.buildResponse(jyjcInspectionResultServiceImpl.updateJyjcInspectionResult(model));
}
/**
* 获取设备种类列表
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "获取设备种类列表", notes = "获取设备种类列表")
@GetMapping(value = "/equipTypeList")
public ResponseModel<List<Map<String,Object>>> equipTypeList(@RequestParam(required = false) String type, @RequestParam(required = false) String notNode) {
return ResponseHelper.buildResponse(jyjcInspectionResultServiceImpl.equipList(type, notNode));
}
}
......@@ -6,6 +6,8 @@ import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionResultParamServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -113,4 +115,16 @@ public class JyjcInspectionResultParamController extends BaseController {
public ResponseModel<List<JyjcInspectionResultParamModel>> selectForList() {
return ResponseHelper.buildResponse(jyjcInspectionResultParamServiceImpl.queryForJyjcInspectionResultParamList());
}
/**
* 获取某一类设备的技术参数
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "获取某一类设备的技术参数", notes = "获取某一类设备的技术参数")
@GetMapping(value = "/getParamByEquipTypeCode")
public ResponseModel<List<Map<String,Object>>> getParamByEquipTypeCode(@RequestParam String equipTypeCode) {
return ResponseHelper.buildResponse(jyjcInspectionResultParamServiceImpl.getParamByEquipTypeCode(equipTypeCode));
}
}
......@@ -5,9 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......@@ -26,6 +27,10 @@ public class CommonserviceImpl {
@Autowired
TzsUserInfoMapper userInfoMapper;
@Autowired
TzBaseEnterpriseInfoMapper enterpriseInfoMapper;
public static final String UNIT_TYPE = "检验检测机构";
/**
* @return ReginParams
......@@ -43,4 +48,8 @@ public class CommonserviceImpl {
List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper);
return userInfos;
}
public List<TzBaseEnterpriseInfo> getInspectionUnitList() {
return enterpriseInfoMapper.getInspectionUnitList(UNIT_TYPE);
}
}
......@@ -3,13 +3,20 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import cn.hutool.core.map.MapBuilder;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.enums.WorkFlowEnum;
import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplication;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult;
import com.yeejoin.amos.boot.module.jyjc.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationMapper;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationAttachmentModel;
import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionApplicationService;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.handler.JyjcInspectionApplicationHandlerFactory;
......@@ -27,11 +34,20 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl.buildOrderNo;
import java.util.Map;
import java.util.Optional;
/**
......@@ -56,6 +72,122 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
* 分页查询
*/
@Autowired
JyjcInspectionApplicationAttachmentServiceImpl jyjcInspectionApplicationAttachmentService;
@Autowired
JyjcInspectionApplicationEquipServiceImpl jyjcInspectionApplicationEquipService;
@Autowired
JyjcInspectionApplicationPushLogServiceImpl jyjcInspectionApplicationPushLogService;
@Autowired
JyjcInspectionEquipStatisticsServiceImpl jyjcInspectionEquipStatisticsService;
@Autowired
WorkflowFeignService workflowFeignService;
public JyjcInspectionApplicationModel save(@RequestBody JyjcInspectionApplicationModel model) {
//开启报检流程工作流
if ( !model.getOperationType().equals("2")){
if (model.getOperationType().equals("0")){
JSONObject body = new JSONObject();
String businessKey = buildOrderNo();
body.put(WorkFlowEnum.BUSINESSKEY.getCode(), businessKey);
body.put(WorkFlowEnum.processDefinitionKey.getCode(), model.getProcessKey());
JSONObject jsonObject = workflowFeignService.startProcess(body);
String processId = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("result"))).getString("id");
model.setProcessInstanceId(processId);
model.setStatus("已提交");
}else if ( model.getOperationType().equals("1")){
model.setStatus("草稿");
}
model = this.createWithModel(model);
//保存报检装备监管码
if ( model.getEquip().size() > 0){
List<Map<String, Object>> equip = model.getEquip();
List<String> jgm = equip.stream().map(e -> e.get("equipUnicode").toString()).collect(Collectors.toList());
for (String s : jgm) {
JyjcInspectionApplicationEquip equipInfo = new JyjcInspectionApplicationEquip();
equipInfo.setApplicationSeq(model.getSequenceNbr());
equipInfo.setEquipUnicode(s);
jyjcInspectionApplicationEquipService.save(equipInfo);
}
}
Map<String, Object> map = BeanUtil.beanToMap(model);
// 附件保存
List<String> enumNameList = DocumentEnum.getEnumNameList();
List<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>();
for (String code : enumNameList) {
if (map.containsKey(code)){
JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment();
attachments.setAttachmentType(code);
attachments.setAttachmentUrl(JSONObject.toJSONString(map.get(code)));
attachments.setApplicationSeq(model.getSequenceNbr());
jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments);
}
}
}else {
//更新报检装备监管码
jyjcInspectionApplicationEquipService.getBaseMapper().deleteByApplicationSeq(model.getSequenceNbr());
if ( model.getEquip().size() > 0){
List<Map<String, Object>> equip = model.getEquip();
List<String> jgm = equip.stream().map(e -> e.get("equipUnicode").toString()).collect(Collectors.toList());
for (String s : jgm) {
JyjcInspectionApplicationEquip equipInfo = new JyjcInspectionApplicationEquip();
equipInfo.setApplicationSeq(model.getSequenceNbr());
equipInfo.setEquipUnicode(s);
jyjcInspectionApplicationEquipService.save(equipInfo);
}
}
Map<String, Object> map = BeanUtil.beanToMap(model);
// 附件更新
List<String> enumNameList = DocumentEnum.getEnumNameList();
List<JyjcInspectionApplicationAttachmentModel> attachmentModels = new ArrayList<>();
jyjcInspectionApplicationAttachmentService.getBaseMapper().deleteByApplicationSeq(model.getSequenceNbr());
for (String code : enumNameList) {
if (map.containsKey(code)){
JyjcInspectionApplicationAttachment attachments = new JyjcInspectionApplicationAttachment();
attachments.setAttachmentType(code);
attachments.setAttachmentUrl(JSONObject.toJSONString(map.get(code)));
attachments.setApplicationSeq(model.getSequenceNbr());
jyjcInspectionApplicationAttachmentService.getBaseMapper().insert(attachments);
}
}
model.setStatus("已提交");
this.updateWithModel(model);
}
return model;
}
public void deleteBatchData(List<Long> sequenceNbr){
List<JyjcInspectionApplication> jyjcInspectionApplications = this.getBaseMapper().selectBatchIds(sequenceNbr);
long count = jyjcInspectionApplications.stream().filter(e -> !e.getStatus().equals("已撤销") && !e.getStatus().equals("已撤回")).count();
if (count > 0){
throw new BadRequest("存在 非已撤销、已退回状态的报检单 不可删除!")
}
this.deleteBatchSeq(sequenceNbr);
for (Long seq : sequenceNbr) {
jyjcInspectionApplicationEquipService.getBaseMapper().deleteByApplicationSeq(seq);
jyjcInspectionApplicationAttachmentService.getBaseMapper().deleteByApplicationSeq(seq);
jyjcInspectionApplicationPushLogService.getBaseMapper().deleteByApplicationSeq(seq);
jyjcInspectionEquipStatisticsService.getBaseMapper().deleteByApplicationSeq(seq);
}
}
public Page<JyjcInspectionApplication> queryForJyjcInspectionApplicationPage(Page<JyjcInspectionApplication> page,
String applicationNo,
......
package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.jyjc.api.common.StringUtil;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionResultParamMapper;
import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultParamModel;
import com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 检验结果技术参数表服务实现类
......@@ -18,6 +26,10 @@ import java.util.List;
*/
@Service
public class JyjcInspectionResultParamServiceImpl extends BaseService<JyjcInspectionResultParamModel,JyjcInspectionResultParam,JyjcInspectionResultParamMapper> implements IJyjcInspectionResultParamService {
@Value("classpath:/json/equipParam.json")
private Resource equipParam;
/**
* 分页查询
*/
......@@ -38,4 +50,14 @@ public class JyjcInspectionResultParamServiceImpl extends BaseService<JyjcInspec
wrapper.eq(JyjcInspectionResultParam::getResultSeq, sequenceNbr);
return this.baseMapper.selectList(wrapper);
}
@Override
public List<Map<String, Object>> getParamByEquipTypeCode(String equipTypeCode) {
List<Map<String, Object>> paramList = new ArrayList<>();
Map<String, List<Map<String, Object>>> paramJson = JsonUtils.getResourceJson(equipParam);
if (StringUtil.isNotEmpty(equipTypeCode)) {
paramList = ObjectUtils.isEmpty(paramJson.get(equipTypeCode)) ? new ArrayList<>() : paramJson.get(equipTypeCode);
}
return paramList;
}
}
\ No newline at end of file
......@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultAttachment;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam;
......@@ -16,16 +18,28 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel;
import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultAttachmentService;
import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService;
import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultService;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel;
import com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.boot.module.ymt.flc.api.feign.PrivilegeFeginService;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -44,6 +58,12 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
private IJyjcInspectionResultParamService iJyjcInspectionResultParamService;
@Autowired
EquipmentCategoryMapper equipmentCategoryMapper;
@Value("classpath:/json/equipCategory.json")
private Resource equipCategory;
@Autowired
JyjcInspectionResultMapper resultMapper;
@Autowired
......@@ -123,4 +143,32 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}
return map;
}
@Override
public List<Map<String, Object>> equipList(String type, String notNode) {
List<Map<String, Object>> menus = new ArrayList<>();
Map<String, List<Map<String, Object>>> resourceJson = JsonUtils.getResourceJson(equipCategory);
List<Map<String, Object>> mapList;
if (ValidationUtil.isEmpty(type)) {
mapList = resourceJson.get(EquipmentClassifityEnum.BDLS.getCode());
} else {
mapList = resourceJson.get(type);
}
mapList.stream().filter(map -> {
if (!ObjectUtils.isEmpty(notNode)) {
String[] code = notNode.split(",");
List<String> codeList = Arrays.asList(code);
return !codeList.contains(map.get("code"));
}
return true;
}).forEach(obj -> {
Map<String, Object> resultMap = new HashMap<>(2);
resultMap.put("instanceName", obj.get("name"));
resultMap.put("instanceId", obj.get("code"));
menus.add(resultMap);
});
return menus;
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jyjc.biz.utils;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.io.IOUtils;
import org.springframework.core.io.Resource;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Map;
public class JsonUtils {
//将json文件转化为Map<list<Map<>>>
public static Map getResourceJson(Resource resource) {
String json = null;
try {
json = IOUtils.toString(resource.getInputStream(), String.valueOf(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new RuntimeException(resource + "json文件转化失败");
}
return JSONObject.parseObject(json, Map.class);
}
}
{
"eightCategory": [
{
"name": "电梯",
"code": "3000",
"image": "upload/tzs/common/image/总览电梯.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "elevator"
},
{
"name": "起重机械",
"code": "4000",
"image": "upload/tzs/common/image/总览起重机械.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "lifting"
},
{
"name": "场内机动车辆",
"code": "5000",
"image": "upload/tzs/common/image/总览厂车.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "vehicle"
},
{
"name": "锅炉",
"code": "1000",
"image": "upload/tzs/common/image/总览锅炉.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "boiler"
},
{
"name": "压力容器",
"code": "2000",
"image": "upload/tzs/common/image/总览压力容器.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "vessel"
},
{
"name": "压力管道",
"code": "8000",
"image": "upload/tzs/common/image/总览压力管道.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "pipeline"
},
{
"name": "大型游乐设施",
"code": "6000",
"image": "upload/tzs/common/image/总览游乐设施.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "rides"
},
{
"name": "客运索道",
"code": "9000",
"image": "upload/tzs/common/image/总览索道.png",
"waitClaim": "0",
"alreadyClaim": "0",
"refuseClaim": "0",
"sum": "0",
"type": "ropeway"
}
],
"other": [
{
"name": "电梯",
"code": "3000"
},
{
"name": "起重机械",
"code": "4000"
},
{
"name": "场内机动车辆",
"code": "5000"
},
{
"name": "锅炉",
"code": "1000"
},
{
"name": "压力容器",
"code": "2000"
},
{
"name": "压力管道",
"code": "8000"
},
{
"name": "大型游乐设施",
"code": "6000"
},
{
"name": "客运索道",
"code": "9000"
}
]
}
\ No newline at end of file
{
"3000": [
{
"label": "使用年限",
"key": "synx",
"type": "input"
},
{
"label": "控制方式",
"key": "kzfs",
"type": "select",
"data": [
{
"name": "选项1",
"value": "1"
},
{
"name": "选项1",
"value": "1"
}
]
}
],
"4000": [
{
"label": "使用年限4000",
"key": "synx",
"type": "input"
}
]
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.ymt.api.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquEnterDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import org.springframework.data.repository.query.Param;
import java.util.List;
/**
* 企业数据信息 Mapper 接口
......@@ -44,4 +45,11 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
IPage<TzBaseEnterpriseInfoDto> page(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto);
IPage<TzBaseEnterpriseInfoDto> pageList(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto, List orgCodeList);
/**
* 查找企业关联设备详情列表
*
*/
List<TzBaseEnterpriseInfo> getInspectionUnitList(@Param("unitType") String unitType);
}
......@@ -49,7 +49,7 @@
</if>
<if
test="tzBaseEnterpriseInfoDto.useUnit!=null and tzBaseEnterpriseInfoDto.useUnit!='' ">
AND use_unit LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useUnit},'%')
AND use_unit LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useUnit},'%')
</if>
<if
test="tzBaseEnterpriseInfoDto.useUnitCertificate!=null and tzBaseEnterpriseInfoDto.useUnitCertificate!='' ">
......@@ -57,7 +57,7 @@
</if>
<if
test="tzBaseEnterpriseInfoDto.useCode!=null and tzBaseEnterpriseInfoDto.useCode!='' ">
AND use_code LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useCode},'%')
AND use_code LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useCode},'%')
</if>
<if
test="tzBaseEnterpriseInfoDto.region!=null and tzBaseEnterpriseInfoDto.region!='' ">
......@@ -65,11 +65,11 @@
</if>
<if
test="tzBaseEnterpriseInfoDto.legalPerson!=null and tzBaseEnterpriseInfoDto.legalPerson!='' ">
AND legal_person LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.legalPerson},'%')
AND legal_person LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.legalPerson},'%')
</if>
<if
test="tzBaseEnterpriseInfoDto.legalPhone!=null and tzBaseEnterpriseInfoDto.legalPhone!='' ">
AND legal_phone LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.legalPhone},'%')
AND legal_phone LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.legalPhone},'%')
</if>
<if
test="tzBaseEnterpriseInfoDto.superviseOrgCode!=null and tzBaseEnterpriseInfoDto.superviseOrgCode!='' ">
......@@ -154,5 +154,10 @@
<select id="selectByUseUnit" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo">
select * from tz_base_enterprise_info where use_unit = #{useUnit}
</select>
<select id="getInspectionUnitList" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo">
select sequence_nbr,use_code,use_unit,use_contact,contact_phone
from tz_base_enterprise_info
where unit_type LIKE CONCAT('%',#{unitType},'%')
</select>
</mapper>
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