Commit e2735d86 authored by 刘林's avatar 刘林

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

parents 30562b33 c87b1f79
...@@ -518,8 +518,10 @@ ...@@ -518,8 +518,10 @@
<select id="selectMtByAlertId" resultType="java.util.Map"> <select id="selectMtByAlertId" resultType="java.util.Map">
SELECT SELECT
SEQUENCE_NBR AS sequenceNbr, SEQUENCE_NBR AS sequenceNbr,
ME_MASTER AS userName, ME_MASTER AS userName1,
EMERGENCYCALL AS phone, ME_MASTER_PHONE AS phone1,
ME_MASTER1 AS userName2,
ME_MASTER1_PHONE AS phone2,
'' AS address, '' AS address,
ME_UNIT_NAME AS unitName, ME_UNIT_NAME AS unitName,
ME_UNIT_CREDIT_CODE AS useCode ME_UNIT_CREDIT_CODE AS useCode
......
...@@ -402,15 +402,15 @@ public class MaintenanceUnitController extends BaseController { ...@@ -402,15 +402,15 @@ public class MaintenanceUnitController extends BaseController {
List<DutyPersonDto> dutyPersonList = new ArrayList<DutyPersonDto>(); List<DutyPersonDto> dutyPersonList = new ArrayList<DutyPersonDto>();
DutyPersonDto principal = new DutyPersonDto(); DutyPersonDto principal = new DutyPersonDto();
principal.setDeptName("主要负责人1"); principal.setDeptName("主要负责人1");
principal.setPhone(ObjectUtils.isEmpty(list.get(0).get("phone")) ? null : String.valueOf(list.get(0).get("phone"))); principal.setPhone(ObjectUtils.isEmpty(list.get(0).get("phone1")) ? null : String.valueOf(list.get(0).get("phone1")));
principal.setUserId(null); principal.setUserId(null);
principal.setUserName(ObjectUtils.isEmpty(list.get(0).get("userName")) ? null : String.valueOf(list.get(0).get("userName"))); principal.setUserName(ObjectUtils.isEmpty(list.get(0).get("userName1")) ? null : String.valueOf(list.get(0).get("userName1")));
dutyPersonList.add(principal); dutyPersonList.add(principal);
DutyPersonDto manager = new DutyPersonDto(); DutyPersonDto manager = new DutyPersonDto();
manager.setDeptName("主要负责人2"); manager.setDeptName("主要负责人2");
manager.setPhone(list.size() == 2 ? String.valueOf(list.get(0).get("phone")) : null); manager.setPhone(ObjectUtils.isEmpty(list.get(0).get("phone2")) ? null : String.valueOf(list.get(0).get("phone2")));
manager.setUserId(null); manager.setUserId(null);
manager.setUserName(list.size() == 2 ? String.valueOf(list.get(0).get("userName")) : null); manager.setUserName(ObjectUtils.isEmpty(list.get(0).get("userName2")) ? null : String.valueOf(list.get(0).get("userName2")));
dutyPersonList.add(manager); dutyPersonList.add(manager);
maintenanceUnitVo.setDutyPersonList(dutyPersonList); maintenanceUnitVo.setDutyPersonList(dutyPersonList);
......
...@@ -8,6 +8,8 @@ import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService; ...@@ -8,6 +8,8 @@ import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.boot.module.jg.biz.service.IPdfService; import com.yeejoin.amos.boot.module.jg.biz.service.IPdfService;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory; import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -18,119 +20,120 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType; ...@@ -18,119 +20,120 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* 装备分类 * 监管公共Api
* *
* @author system_generator * @author system_generator
* @date 2021-10-20 * @date 2021-10-20
*/ */
@RestController @RestController
@Api(tags = "装备分类Api") @Api(tags = "监管公共Api")
@RequestMapping(value = "/common") @RequestMapping(value = "/common")
public class CommonController extends BaseController { public class CommonController extends BaseController {
@Autowired @Autowired
ICommonService commonService; ICommonService commonService;
@Autowired @Autowired
IPdfService pdfService; IPdfService pdfService;
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getChildren") @GetMapping(value = "/getChildren")
@ApiOperation(httpMethod = "GET", value = "通过设备种类code获取设备类别", notes = "通过设备种类code获取设备类别") @ApiOperation(httpMethod = "GET", value = "通过设备种类code获取设备类别", notes = "通过设备种类code获取设备类别")
public ResponseModel<List<EquipmentCategory>> getChildren(@RequestParam(value = "code") String code, public ResponseModel<List<EquipmentCategory>> getChildren(@RequestParam(value = "code") String code,
@RequestParam(value = "type", required = false) String type) { @RequestParam(value = "type", required = false) String type) {
return ResponseHelper.buildResponse(commonService.getEquipmentCategoryList(code, type)); return ResponseHelper.buildResponse(commonService.getEquipmentCategoryList(code, type));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getRegion") @GetMapping(value = "/getRegion")
@ApiOperation(httpMethod = "GET", value = "获取行政区划", notes = "获取行政区划") @ApiOperation(httpMethod = "GET", value = "获取行政区划", notes = "获取行政区划")
public ResponseModel<Object> getRegion(@RequestParam(value = "level", required = false) String level, public ResponseModel<Object> getRegion(@RequestParam(value = "level", required = false) String level,
@RequestParam(value = "parentId", required = false) String parentId) { @RequestParam(value = "parentId", required = false) String parentId) {
return ResponseHelper.buildResponse(commonService.getRegion(level, parentId)); return ResponseHelper.buildResponse(commonService.getRegion(level, parentId));
} }
/** /**
* 获取管辖分局树 * 获取管辖分局树
* *
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/creatTree") @GetMapping(value = "/creatTree")
@ApiOperation(httpMethod = "GET", value = "获取管辖分局树", notes = "获取管辖分局树") @ApiOperation(httpMethod = "GET", value = "获取管辖分局树", notes = "获取管辖分局树")
public ResponseModel<Object> creatTree() { public ResponseModel<Object> creatTree() {
return ResponseHelper.buildResponse(commonService.getTree(getSelectedOrgInfo())); return ResponseHelper.buildResponse(commonService.getTree(getSelectedOrgInfo()));
} }
/** /**
* 工作台接收机构树 * 工作台接收机构树
* @param bizType 业务类型:notice-告知类, register-登记类 *
* @return 树 * @param bizType 业务类型:notice-告知类, register-登记类
*/ * @return 树
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@GetMapping(value = "/{bizType}/receive-unit/tree") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "接收机构树", notes = "接收机构树") @GetMapping(value = "/{bizType}/receive-unit/tree")
public ResponseModel<Object> getNoticeReceiveTree(@PathVariable String bizType) { @ApiOperation(httpMethod = "GET", value = "接收机构树", notes = "接收机构树")
return ResponseHelper.buildResponse(commonService.getReceiveUnitTree(bizType)); public ResponseModel<Object> getNoticeReceiveTree(@PathVariable String bizType) {
} return ResponseHelper.buildResponse(commonService.getReceiveUnitTree(bizType));
}
/**
/** * 获取行政审批局树
* 获取行政审批局树 *
* * @return
* @return */
*/ @TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY) @GetMapping(value = "/getApproveTree")
@GetMapping(value = "/getApproveTree") @ApiOperation(httpMethod = "GET", value = "获取行政审批局树", notes = "获取行政审批局树")
@ApiOperation(httpMethod = "GET", value = "获取行政审批局树", notes = "获取行政审批局树") public ResponseModel<Object> getApproveTree() {
public ResponseModel<Object> getApproveTree() { ReginParams reginParams = getSelectedOrgInfo();
ReginParams reginParams = getSelectedOrgInfo(); return ResponseHelper.buildResponse(commonService.getApproveTree(reginParams));
return ResponseHelper.buildResponse(commonService.getApproveTree(reginParams)); }
}
/**
/** * 通过单位类型获取单位列表
* 通过单位类型获取单位列表 *
* * @return
* @return */
*/ @TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY) @GetMapping(value = "/getUnitList")
@GetMapping(value = "/getUnitList") @ApiOperation(httpMethod = "GET", value = "通过单位类型获取单位列表", notes = "通过单位类型获取单位列表")
@ApiOperation(httpMethod = "GET", value = "通过单位类型获取单位列表", notes = "通过单位类型获取单位列表") public ResponseModel<List<Map<String, Object>>> getUnitList(@RequestParam(value = "type") String type) {
public ResponseModel<List<Map<String,Object>>> getUnitList(@RequestParam(value = "type") String type) { return ResponseHelper.buildResponse(commonService.getUnitListByType(type));
return ResponseHelper.buildResponse(commonService.getUnitListByType(type)); }
}
/**
/** * 查找当前公司下所属的安全管理员
* 查找当前公司下所属的安全管理员 *
* * @return
* @return */
*/ @TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY) @GetMapping(value = "/getSecurityAdmin")
@GetMapping(value = "/getSecurityAdmin") @ApiOperation(httpMethod = "GET", value = "查找当前公司下所属的安全管理员", notes = "查找当前公司下所属的安全管理员")
@ApiOperation(httpMethod = "GET", value = "查找当前公司下所属的安全管理员", notes = "查找当前公司下所属的安全管理员") public ResponseModel<List<Map<String, Object>>> getSecurityAdmin(@RequestParam(value = "type") String type,
public ResponseModel<List<Map<String, Object>>> getSecurityAdmin(@RequestParam(value = "type") String type, @RequestParam(value = "useUnitCode", required = false) String useUnitCode) {
@RequestParam(value = "useUnitCode",required = false)String useUnitCode) { return ResponseHelper.buildResponse(commonService.getSecurityAdmin(type, useUnitCode));
return ResponseHelper.buildResponse(commonService.getSecurityAdmin(type,useUnitCode)); }
}
/**
/** * 查询安全管理员的基本信息
* 查询安全管理员的基本信息 *
* * @return
* @return */
*/ @TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY) @GetMapping(value = "/getUserPhone")
@GetMapping(value = "/getUserPhone") @ApiOperation(httpMethod = "GET", value = "查询用户对应联系方式", notes = "查询用户对应联系方式")
@ApiOperation(httpMethod = "GET", value = "查询用户对应联系方式", notes = "查询用户对应联系方式") public ResponseModel<Map<String, Object>> getUserInfo(@RequestParam(value = "sequenceNbr") String sequenceNbr) {
public ResponseModel<Map<String,Object>> getUserInfo(@RequestParam(value = "sequenceNbr") String sequenceNbr) { return ResponseHelper.buildResponse(commonService.getUserInfo(sequenceNbr));
return ResponseHelper.buildResponse(commonService.getUserInfo(sequenceNbr)); }
}
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUserInfoSplit") @GetMapping(value = "/getUserInfoSplit")
@ApiOperation(httpMethod = "GET", value = "查询安全管理员的基本信息", notes = "查询安全管理员的基本信息") @ApiOperation(httpMethod = "GET", value = "查询安全管理员的基本信息", notes = "查询安全管理员的基本信息")
...@@ -140,188 +143,211 @@ public class CommonController extends BaseController { ...@@ -140,188 +143,211 @@ public class CommonController extends BaseController {
} }
return ResponseHelper.buildResponse(commonService.getUserInfo(sequenceNbr)); return ResponseHelper.buildResponse(commonService.getUserInfo(sequenceNbr));
} }
/**
* 查询企业的基本信息 /**
* * 查询企业的基本信息
* @return *
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@GetMapping(value = "/getEnterpriseInfo") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询企业的基本信息", notes = "查询企业的基本信息") @GetMapping(value = "/getEnterpriseInfo")
public ResponseModel<Map<String,Object>> getEnterpriseInfo(@RequestParam(value = "sequenceNbr") String sequenceNbr) { @ApiOperation(httpMethod = "GET", value = "查询企业的基本信息", notes = "查询企业的基本信息")
return ResponseHelper.buildResponse(commonService.getEnterpriseInfo(sequenceNbr)); public ResponseModel<Map<String, Object>> getEnterpriseInfo(@RequestParam(value = "sequenceNbr") String sequenceNbr) {
} return ResponseHelper.buildResponse(commonService.getEnterpriseInfo(sequenceNbr));
}
/**
* 查询企业的下面的人员 /**
* * 查询企业的下面的人员
* @return *
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@GetMapping(value = "/getEnterpriseEmployee") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询企业的下面的人员", notes = "查询企业的下面的人员") @GetMapping(value = "/getEnterpriseEmployee")
public ResponseModel<List<Map<String,Object>>> getEnterpriseEmployee(@RequestParam String unitCode) { @ApiOperation(httpMethod = "GET", value = "查询企业的下面的人员", notes = "查询企业的下面的人员")
String companyCode = unitCode.split("_")[0]; public ResponseModel<List<Map<String, Object>>> getEnterpriseEmployee(@RequestParam String unitCode) {
return ResponseHelper.buildResponse(commonService.getEnterpriseEmployee(companyCode)); String companyCode = unitCode.split("_")[0];
} return ResponseHelper.buildResponse(commonService.getEnterpriseEmployee(companyCode));
}
@TycloudOperation (ApiLevel = UserType.AGENCY)
@ApiOperation (httpMethod = "GET", value = "流程状态枚举列表", notes = "流程状态枚举列表") @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping (value = "/flow-status/list") @ApiOperation(httpMethod = "GET", value = "流程状态枚举列表", notes = "流程状态枚举列表")
public ResponseModel<List<Map<String, Object>>> selectForFlowStatusList() { @GetMapping(value = "/flow-status/list")
return ResponseHelper.buildResponse(Arrays.stream(FlowStatusEnum.values()).map(this::mapPointTypeToMap).filter(Objects::nonNull).collect(Collectors.toList())); public ResponseModel<List<Map<String, Object>>> selectForFlowStatusList() {
} return ResponseHelper.buildResponse(Arrays.stream(FlowStatusEnum.values()).map(this::mapPointTypeToMap).filter(Objects::nonNull).collect(Collectors.toList()));
}
private Map<String, Object> mapPointTypeToMap(FlowStatusEnum e) {
if (FlowStatusEnum.TO_SUBMITTED.getCode() == e.getCode() || FlowStatusEnum.TO_BE_DISCARD.getCode() == e.getCode()) { private Map<String, Object> mapPointTypeToMap(FlowStatusEnum e) {
return null; if (FlowStatusEnum.TO_SUBMITTED.getCode() == e.getCode() || FlowStatusEnum.TO_BE_DISCARD.getCode() == e.getCode()) {
} return null;
Map<String, Object> record = new HashMap<>(); }
record.put("key", e.getCode()); Map<String, Object> record = new HashMap<>();
record.put("label", e.getName()); record.put("key", e.getCode());
return record; record.put("label", e.getName());
} return record;
}
/**
* 查询监管业务名称列表 /**
* * 查询监管业务名称列表
* @return *
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@ApiOperation(httpMethod = "GET", value = "查询监管业务名称列表", notes = "查询监管业务名称列表") @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/superviseBusinessCategory") @ApiOperation(httpMethod = "GET", value = "查询监管业务名称列表", notes = "查询监管业务名称列表")
public ResponseModel<Object> equipTree(String type) { @GetMapping(value = "/superviseBusinessCategory")
return ResponseHelper.buildResponse(commonService.superviseBusinessCategory(type)); public ResponseModel<Object> equipTree(String type) {
} return ResponseHelper.buildResponse(commonService.superviseBusinessCategory(type));
}
@Autowired
private IJgInstallationNoticeService iJgInstallationNoticeService; @Autowired
private IJgInstallationNoticeService iJgInstallationNoticeService;
/**
* 业务发起公共接口 /**
* /jg/jg-installation-notice/save * 业务发起公共接口
*/ * /jg/jg-installation-notice/save
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@PostMapping(value = "/saveOrSubmit") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "业务发起公共接口", notes = "业务发起公共接口") @PostMapping(value = "/saveOrSubmit")
public ResponseModel<Object> save(@RequestParam(value = "submitType", required = false) String submitType, @ApiOperation(httpMethod = "POST", value = "业务发起公共接口", notes = "业务发起公共接口")
@RequestBody Map<String, Object> map) { public ResponseModel<Object> save(@RequestParam(value = "submitType", required = false) String submitType,
ReginParams reginParams = getSelectedOrgInfo(); @RequestBody Map<String, Object> map) {
Object result = commonService.invokeBusinessProcess(submitType, map, reginParams); ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(result); Object result = commonService.invokeBusinessProcess(submitType, map, reginParams);
} return ResponseHelper.buildResponse(result);
}
/**
* 根据公司id获取公司下人员 /**
* * 根据公司id获取公司下人员
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getCompanyUser") @GetMapping(value = "/getCompanyUser")
@ApiOperation(httpMethod = "get", value = "根据公司id获取公司下人员", notes = "根据公司id获取公司下人员") @ApiOperation(httpMethod = "get", value = "根据公司id获取公司下人员", notes = "根据公司id获取公司下人员")
public ResponseModel<Object> getCompanyUser(@RequestParam(value = "companyId",required = false) Long companyId) { public ResponseModel<Object> getCompanyUser(@RequestParam(value = "companyId", required = false) Long companyId) {
if(ObjectUtils.isEmpty(companyId)){ if (ObjectUtils.isEmpty(companyId)) {
return null; return null;
} }
Object result = commonService.getCompanyUser(companyId); Object result = commonService.getCompanyUser(companyId);
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
/** /**
* 获取当前登录人企业类型 * 获取当前登录人企业类型
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getCompanyType") @GetMapping(value = "/getCompanyType")
@ApiOperation(httpMethod = "GET", value = "获取当前登录人企业类型", notes = "获取当前登录人企业类型") @ApiOperation(httpMethod = "GET", value = "获取当前登录人企业类型", notes = "获取当前登录人企业类型")
public ResponseModel<Object> getCompanyType() { public ResponseModel<Object> getCompanyType() {
return ResponseHelper.buildResponse(iJgInstallationNoticeService.getCompanyType()); return ResponseHelper.buildResponse(iJgInstallationNoticeService.getCompanyType());
} }
/**
* 获取管辖分局树 /**
* * 获取管辖分局树
* @return *
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@GetMapping(value = "/getCreatTree") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取管辖分局树", notes = "获取管辖分局树") @GetMapping(value = "/getCreatTree")
public ResponseModel<Object> getCreatTree() { @ApiOperation(httpMethod = "GET", value = "获取管辖分局树", notes = "获取管辖分局树")
return ResponseHelper.buildResponse(commonService.getCreatTree()); public ResponseModel<Object> getCreatTree() {
} return ResponseHelper.buildResponse(commonService.getCreatTree());
}
/**
* 获取管辖分局树 /**
* * 获取管辖分局树
* @return *
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@GetMapping(value = "/getCreatTreeByInstallation") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取管辖分局树安装告知使用", notes = "获取管辖分局树安装告知使用") @GetMapping(value = "/getCreatTreeByInstallation")
public ResponseModel<Object> getCreatTreeByInstallation(String county) { @ApiOperation(httpMethod = "GET", value = "获取管辖分局树安装告知使用", notes = "获取管辖分局树安装告知使用")
List<LinkedHashMap> creatTree = commonService.getCreatTreeByInstallation(); public ResponseModel<Object> getCreatTreeByInstallation(String county) {
String code = county.split("_")[0]; List<LinkedHashMap> creatTree = commonService.getCreatTreeByInstallation();
List<LinkedHashMap> infoByCounty = getInfoByCounty(code, creatTree); String code = county.split("_")[0];
return ResponseHelper.buildResponse(infoByCounty); List<LinkedHashMap> infoByCounty = getInfoByCounty(code, creatTree);
} return ResponseHelper.buildResponse(infoByCounty);
}
private List<LinkedHashMap> getInfoByCounty(String county, List<LinkedHashMap> children) {
for (LinkedHashMap item : children) { private List<LinkedHashMap> getInfoByCounty(String county, List<LinkedHashMap> children) {
if (item.get("companyCode").toString().equals(county)) { for (LinkedHashMap item : children) {
return (List<LinkedHashMap>) item.get("children"); if (item.get("companyCode").toString().equals(county)) {
} else { return (List<LinkedHashMap>) item.get("children");
if (!ObjectUtils.isEmpty(item.get("children"))) { } else {
List<LinkedHashMap> children1 = getInfoByCounty(county, (List<LinkedHashMap>) item.get("children")); if (!ObjectUtils.isEmpty(item.get("children"))) {
if (!CollectionUtils.isEmpty(children1)) { List<LinkedHashMap> children1 = getInfoByCounty(county, (List<LinkedHashMap>) item.get("children"));
return children1; if (!CollectionUtils.isEmpty(children1)) {
} return children1;
} }
} }
} }
return new ArrayList<>(); }
} return new ArrayList<>();
}
/**
* 公共转办接口 /**
* /jg/common/transfer * 公共转办接口
*/ * /jg/common/transfer
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@PostMapping(value = "/transfer") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "公共转办接口", notes = "公共转办接口") @PostMapping(value = "/transfer")
public ResponseModel<Object> transfer(@RequestBody Map<String, Object> map) { @ApiOperation(httpMethod = "POST", value = "公共转办接口", notes = "公共转办接口")
Object result = commonService.transfer(map); public ResponseModel<Object> transfer(@RequestBody Map<String, Object> map) {
return ResponseHelper.buildResponse(result); Object result = commonService.transfer(map);
} return ResponseHelper.buildResponse(result);
}
/**
* 校验EQUCODE的唯一性 /**
* @param equCode EQUCODE * 校验EQUCODE的唯一性
* @return *
*/ * @param equCode EQUCODE
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) * @return
@GetMapping(value = "/checkUniquenessOfEQUCODE") */
@ApiOperation(httpMethod = "GET", value = "校验EQUCODE的唯一性", notes = "校验EQUCODE的唯一性") @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
public ResponseModel<Object> checkUniquenessOfEQUCODE(String equCode) { @GetMapping(value = "/checkUniquenessOfEQUCODE")
Boolean bool = commonService.checkUniquenessOfEQUCODE(equCode); @ApiOperation(httpMethod = "GET", value = "校验EQUCODE的唯一性", notes = "校验EQUCODE的唯一性")
return ResponseHelper.buildResponse(bool); public ResponseModel<Object> checkUniquenessOfEQUCODE(String equCode) {
} Boolean bool = commonService.checkUniquenessOfEQUCODE(equCode);
return ResponseHelper.buildResponse(bool);
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/test-file")
@ApiOperation(httpMethod = "GET", value = "文件测试", notes = "文件测试") @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
public ResponseModel<String> testFile() { @GetMapping(value = "/test-file")
return ResponseHelper.buildResponse(pdfService.signToPdf("upload/tzs/pdf/1708911268708_temp.pdf", "已作废")); @ApiOperation(httpMethod = "GET", value = "文件测试", notes = "文件测试")
} public ResponseModel<String> testFile() {
return ResponseHelper.buildResponse(pdfService.signToPdf("upload/tzs/pdf/1708911268708_temp.pdf", "已作废"));
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) }
@GetMapping(value = "/water-print")
@ApiOperation(httpMethod = "GET", value = "文件测试", notes = "文件测试") @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
public ResponseModel<String> signToPdfWaterPrint() { @GetMapping(value = "/water-print")
return ResponseHelper.buildResponse(pdfService.signToPdfWaterPrint("upload/tzs/pdf/1708911268708_temp.pdf", "已作废")); @ApiOperation(httpMethod = "GET", value = "文件测试", notes = "文件测试")
} public ResponseModel<String> signToPdfWaterPrint() {
return ResponseHelper.buildResponse(pdfService.signToPdfWaterPrint("upload/tzs/pdf/1708911268708_temp.pdf", "已作废"));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equList")
@ApiOperation(httpMethod = "GET", value = "按照业务类型查询设备种类,工作台使用", notes = "按照业务类型查询设备种类,工作台使用")
public ResponseModel<List<DictionarieValueModel>> equList(@RequestParam(value = "type") String bizType) {
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_SBZL,如BF_YZ_SBZL==》移装注销-设备种类
String suffix = "_SBZL";
String dictCode = bizType + suffix;
return ResponseHelper.buildResponse(Systemctl.dictionarieClient.dictValues(dictCode).getResult());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equ-category/{categoryCode}/list")
@ApiOperation(httpMethod = "GET", value = "按照业务类型、设备种类查询设备类别", notes = "按照业务类型、设备种类查询设备类别")
public ResponseModel<List<DictionarieValueModel>> equCategoryList(@RequestParam(value = "type") String bizType,
@PathVariable String categoryCode) {
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_{categoryCode},如BF_YZ_1000==》移装注销-锅炉
String dictCode = String.format("%s_%s", bizType, categoryCode);
return ResponseHelper.buildResponse(Systemctl.dictionarieClient.dictValues(dictCode).getResult());
}
} }
...@@ -1090,6 +1090,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1090,6 +1090,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust.must(elBuilder); boolMust.must(elBuilder);
} }
// 设备类别
if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY_CODE"))) {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("EQU_CATEGORY_CODE"));
pBuilder.must(QueryBuilders.termQuery("EQU_CATEGORY_CODE",test));
boolMust.must(pBuilder);
}
builder.query(boolMust); builder.query(boolMust);
builder.sort("REC_DATE", SortOrder.DESC); builder.sort("REC_DATE", SortOrder.DESC);
......
...@@ -146,7 +146,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -146,7 +146,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Value("classpath:/json/urlInfo.json") @Value("classpath:/json/urlInfo.json")
public Resource bizTypeInfo; public Resource bizTypeInfo;
@Value("${tzs.domain}") @Value("${tzs.domain:http://sxtzsb.sxsei.com}")
String TZSDOMAIN ; String TZSDOMAIN ;
@Autowired @Autowired
......
...@@ -513,32 +513,24 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -513,32 +513,24 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
*/ */
private void updateEquipMessage(Long id) { private void updateEquipMessage(Long id) {
JgMaintenanceContract jgMaintenanceContract = this.getBaseMapper().selectById(id); JgMaintenanceContract jgMaintenanceContract = this.getBaseMapper().selectById(id);
ArrayList<String[]> maintenanceManager = new ArrayList<>();
maintenanceManager.add(new String[]{jgMaintenanceContract.getMaintenanceManagerOneName(), jgMaintenanceContract.getMaintenanceManagerOnePhone()});
maintenanceManager.add(new String[]{jgMaintenanceContract.getMaintenanceManagerTwoName(), jgMaintenanceContract.getMaintenanceManagerTwoPhone()});
LambdaQueryWrapper<JgMaintenanceContractEq> lambda = new QueryWrapper<JgMaintenanceContractEq>().lambda(); LambdaQueryWrapper<JgMaintenanceContractEq> lambda = new QueryWrapper<JgMaintenanceContractEq>().lambda();
lambda.eq(JgMaintenanceContractEq::getEquipTransferId, id); lambda.eq(JgMaintenanceContractEq::getEquipTransferId, id);
List<JgMaintenanceContractEq> list = jgMaintenanceContractEqService.getBaseMapper().selectList(lambda); List<JgMaintenanceContractEq> list = jgMaintenanceContractEqService.getBaseMapper().selectList(lambda);
ArrayList<IdxBizJgMaintenanceRecordInfo> data = new ArrayList<>(); ArrayList<IdxBizJgMaintenanceRecordInfo> data = new ArrayList<>();
// 循环设备 // 循环设备
list.forEach(item -> { list.forEach(item -> {
// 循环添加两条维保备案信息表数据,存储两个维保负责人 IdxBizJgMaintenanceRecordInfo info = new IdxBizJgMaintenanceRecordInfo();
for (int i = 0; i < 2; i++) { info.setRecord(item.getEquId());
IdxBizJgMaintenanceRecordInfo info = new IdxBizJgMaintenanceRecordInfo(); info.setMeUnitName(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceUnitName()) ? null : jgMaintenanceContract.getMaintenanceUnitName());
info.setRecord(item.getEquId()); info.setMeUnitCreditCode(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceUnitCode()) ? null : jgMaintenanceContract.getMaintenanceUnitCode());
info.setMeUnitName(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceUnitName()) ? null : jgMaintenanceContract.getMaintenanceUnitName()); info.setMeMaster(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceManagerOneName()) ? null : jgMaintenanceContract.getMaintenanceManagerOneName());
info.setMeUnitCreditCode(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceUnitCode()) ? null : jgMaintenanceContract.getMaintenanceUnitCode()); info.setMeMasterPhone(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceManagerOnePhone()) ? null : jgMaintenanceContract.getMaintenanceManagerOnePhone());
String[] manager = maintenanceManager.get(i); info.setMeMaster1(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceManagerTwoName()) ? null : jgMaintenanceContract.getMaintenanceManagerTwoName());
info.setMeMaster(ObjectUtils.isEmpty(manager[0]) ? null : manager[0]); info.setMeMaster1Phone(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceManagerTwoPhone()) ? null : jgMaintenanceContract.getMaintenanceManagerTwoPhone());
info.setEmergencycall(ObjectUtils.isEmpty(manager[1]) ? null : manager[1]); info.setInformStart(ObjectUtils.isEmpty(jgMaintenanceContract.getInformStart()) ? null : jgMaintenanceContract.getInformStart());
info.setInformStart(ObjectUtils.isEmpty(jgMaintenanceContract.getInformStart()) ? null : jgMaintenanceContract.getInformStart()); info.setInformEnd(ObjectUtils.isEmpty(jgMaintenanceContract.getInformEnd()) ? null : jgMaintenanceContract.getInformEnd());
info.setInformEnd(ObjectUtils.isEmpty(jgMaintenanceContract.getInformEnd()) ? null : jgMaintenanceContract.getInformEnd()); info.setRepairInform(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceContract()) ? null : jgMaintenanceContract.getMaintenanceContract());
info.setRepairInform(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceContract()) ? null : jgMaintenanceContract.getMaintenanceContract()); data.add(info);
data.add(info);
}
}); });
idxBizJgMaintenanceRecordInfoService.saveBatch(data); idxBizJgMaintenanceRecordInfoService.saveBatch(data);
} }
......
...@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.ymt.api.entity; ...@@ -2,11 +2,11 @@ package com.yeejoin.amos.boot.module.ymt.api.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity; import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.util.Date;
/** /**
...@@ -74,18 +74,41 @@ public class IdxBizJgMaintenanceRecordInfo extends TzsBaseEntity { ...@@ -74,18 +74,41 @@ public class IdxBizJgMaintenanceRecordInfo extends TzsBaseEntity {
private Date informEnd; private Date informEnd;
/** /**
* *维保负责人1姓名
*/ */
@TableField("\"ME_MASTER\"") @TableField("\"ME_MASTER\"")
private String meMaster; private String meMaster;
/** /**
* *维保负责人2姓名
*/
@TableField("\"ME_MASTER1\"")
private String meMaster1;
/**
*维保负责人1身份证
*/ */
@TableField("\"ME_MASTER_ID\"") @TableField("\"ME_MASTER_ID\"")
private String meMasterId; private String meMasterId;
/** /**
*维保负责人2身份证
*/
@TableField("\"ME_MASTER1_ID\"")
private String meMaster1Id;
/**
*维保负责人2电话
*/
@TableField("\"ME_MASTER1_PHONE\"")
private String meMaster1Phone;
/**
*维保负责人1电话
*/
@TableField("\"ME_MASTER_PHONE\"")
private String meMasterPhone;
/**
* *
*/ */
@TableField("\"EMERGENCYCALL\"") @TableField("\"EMERGENCYCALL\"")
......
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