Commit a25eb268 authored by sxwnfpwx@163.com's avatar sxwnfpwx@163.com

.

parents 8ed81e85 4872be8f
......@@ -68,7 +68,14 @@ public class TaBusinessServiceImpl extends BaseService<TaAccessConfigModel, TaAc
String street = address.substring(area.length()).substring(0,address.substring(area.length()).indexOf("号")+1);
String community = address.substring(area.length()+street.length());
String industry = getIndustry(data.getString("hydm"));
String industry = "";
if(!ValidationUtil.isEmpty(data.get("hydm"))){
if(data.getString("hydm").length() > 2){
industry = getIndustry(data.getString("hydm"));
}
}
//所属行业
result.put("industry", industry);
......
......@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.common.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.HashMap;
import java.util.Map;
@Getter
@AllArgsConstructor
public enum OrgPersonEnum {
......@@ -15,4 +18,5 @@ public enum OrgPersonEnum {
private String code;
private String name;
}
......@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -43,15 +44,6 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify;
import com.yeejoin.amos.boot.module.common.api.dto.CheckObjectDto;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson;
import com.yeejoin.amos.boot.module.common.api.dto.ESOrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.UserDto;
import com.yeejoin.amos.boot.module.common.api.dto.UserUnitDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
......
......@@ -27,6 +27,8 @@ public class SpeUseUnit implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "单位名称")
private String name;
......@@ -145,5 +147,8 @@ public class SpeUseUnit implements Serializable {
@ApiModelProperty(value = "同步id")
private String syncId;
@ApiModelProperty(value = "同步状态")
private Integer syncState;
}
......@@ -30,7 +30,7 @@ public interface IRegUnitInfoService {
* @param unitType 单位类型
* @return RegUnitInfoDto
*/
RegUnitInfoDto unitCheck(String unitCode, String unitType);
RegUnitInfoDto unitCheck(String unitCode, String unitType,String companyName);
/**
* 单位类型列表字典
......
......@@ -135,7 +135,7 @@ public class InspectionController {
FeignClientResult<CompanyModel> company = Privilege.companyClient.seleteOne(Long.valueOf(selectValue));
FeignClientResult<Page<AgencyUserModel>> result = new FeignClientResult<Page<AgencyUserModel>>();
if (company.getResult() != null) {
result = Privilege.agencyUserClient.queryForPageByCompany(company.getResult().getOrgCode(), "county",
result = Privilege.agencyUserClient.queryForPageByCompany(company.getResult().getOrgCode(), "headquarter,prefecture-level,county",
mobile, realName, current, size);
}
return ResponseHelper.buildResponse(result.getResult());
......
package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -17,14 +14,16 @@ 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 java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 特种设备权限controller
......@@ -79,5 +78,36 @@ public class TzsAuthController extends BaseController {
}
/**
* 获取用户监管机构
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUserRegulator")
@ApiOperation(httpMethod = "GET", value = "获取用户组织机构树", notes = "获取用户组织机构树")
public ResponseModel<Map<String,Object>> getUserRegulator () {
Map<String,Object> map = new HashMap<String,Object>();
FeignClientResult<AgencyUserModel> result=Privilege.agencyUserClient.getme();
if(result.getResult()!=null)
{
List<CompanyModel> list = result.getResult().getCompanys();
if(list!=null&&!list.isEmpty())
{
CompanyModel company = list.get(0);
if("company".equals(company.getLevel()))
{
FeignClientResult<CompanyModel> cResult =Privilege.companyClient.seleteOne(company.getParentId());
if(cResult.getResult()!=null)
{
map.put("regulator", cResult.getResult().getCompanyName());
}
}else
{
map.put("regulator",company.getCompanyName());
}
map.put("company", company.getCompanyName());
}
map.put("userName", result.getResult().getRealName());
}
return ResponseHelper.buildResponse(map);
}
}
......@@ -54,6 +54,9 @@ public class TzsAuthServiceImpl implements TzsAuthService {
*/
@Value("${redis.cache.failure.time}")
private Long redisRegionTimeSecond;
@Autowired
private StartPlatformTokenService startPlatformTokenService;
@Override
......@@ -75,7 +78,8 @@ public class TzsAuthServiceImpl implements TzsAuthService {
@Override
public List<RegionModel> getUserReginTree() {
List<String> regionList = this.getUserRegionCode();
AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
//AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
startPlatformTokenService.getToken();
List<RegionModel> tree = (List<RegionModel>) Systemctl.regionClient.queryForTree(null).getResult();
// 循环list 将List 封装为 省市区 SET
Set<String> city = new HashSet<>();
......@@ -128,8 +132,8 @@ public class TzsAuthServiceImpl implements TzsAuthService {
for(Map.Entry<String, RegionModel> entries : tempCityMap.entrySet()) {
newCity.add(entries.getValue());
}
start.setChildren(newCity);
newTree.add(start);
//start.setChildren(newCity);
newTree.addAll(newCity);
return newTree;
}
......
package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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 com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.StartPlatformTokenService;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.RegUnitInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.IRegUnitInfoService;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
/**
* 单位注册信息表
......@@ -54,19 +72,32 @@ public class RegUnitInfoController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "单位注册", notes = "单位注册")
public ResponseModel<RegUnitInfoDto> save(@RequestBody RegUnitInfoDto model) {
model = iRegUnitInfoService.registerUnit(model);
return ResponseHelper.buildResponse(model);
try {
model = iRegUnitInfoService.registerUnit(model);
return ResponseHelper.buildResponse(model);
} catch (Exception e) {
ResponseModel<RegUnitInfoDto> response = new ResponseModel<>();
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
response.setResult(null);
response.setDevMessage(e.getMessage());
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
response.setTraceId(RequestContext.getTraceId());
response.setPath(request.getServletPath());
return response;
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/{unitCode}/check")
@ApiOperation(httpMethod = "GET", value = "单位注册校验", notes = "单位注册校验")
public ResponseModel<RegUnitInfoDto> unitCheck(@PathVariable String unitCode,
@RequestParam String unitType) {
@RequestParam String unitType,
@RequestParam String companyName) {
if (ValidationUtil.isEmpty(unitCode)) {
throw new BadRequest("单位编码不能为空");
}
RegUnitInfoDto regUnitInfoDto = iRegUnitInfoService.unitCheck(unitCode, unitType);
}
RegUnitInfoDto regUnitInfoDto = iRegUnitInfoService.unitCheck(unitCode, unitType,companyName);
return ResponseHelper.buildResponse(regUnitInfoDto);
}
......
......@@ -40,6 +40,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.BaseUnitLicenceDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.BaseUnitLicence;
import com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.BaseUnitLicenceServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.StartPlatformTokenService;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzBaseEnterpriseInfoServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAuthServiceImpl;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.RegUnitIcDto;
......@@ -87,7 +88,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
@Autowired
AccessFeignService accessFeignService;
@Autowired
StartPlatformTokenService startPlatformTokenService;
/**
* 使用单位的类型,数据来源:cb_data_dictionary code = 1232
*/
......@@ -218,13 +221,31 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
}
@Override
public RegUnitInfoDto unitCheck(String unitCode, String unitType) {
public RegUnitInfoDto unitCheck(String unitCode, String unitType,String companyName) {
if (!ValidationUtil.isEmpty(companyName)) {
startPlatformTokenService.getToken();
FeignClientResult<CompanyModel> result =Privilege.companyClient.queryByCompanyName(companyName);
if(result.getResult()!=null)
{
throw new BadRequest("重复的公司名称");
}
}
if (!ValidationUtil.isEmpty(unitCode)) {
startPlatformTokenService.getToken();
FeignClientResult<CompanyModel> result =Privilege.companyClient.queryByCompanyCode(unitCode);
if(result.getResult()!=null)
{
throw new RuntimeException("重复的公司编码");
}
}
// 1.校验重复性
RegUnitInfo regUnitInfo = this
.getOne(new LambdaQueryWrapper<RegUnitInfo>().eq(RegUnitInfo::getUnitCode, unitCode));
if (regUnitInfo != null) {
throw new RuntimeException("该单位已注册,请联系企业管理员!");
}
// RegUnitInfo regUnitInfo = this
// .getOne(new LambdaQueryWrapper<RegUnitInfo>().eq(RegUnitInfo::getUnitCode, unitCode));
// if (regUnitInfo != null) {
// throw new RuntimeException("该单位已注册,请联系企业管理员!");
// }
// 2.组织返回数据
RegUnitInfoDto regUnitInfoDto = new RegUnitInfoDto();
if (USE_UNIT_TYPE_CODE.equals(unitType) || PRODUCT_UNIT_TYPE_CODE.equals(unitType) || FILLING_UNIT_TYPE_CODE.equals(unitType)) {
......
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.HashMap;
@Getter
@AllArgsConstructor
public enum OrgEnum {
公司("COMPANY", "244", "公司",1),
部门("DEPARTMENT", "245", "部门",2),
人员("PERSON", "246", "人员",3),
焊工("WELDER","247","焊工",3),
建设单位负责人("CHARGE","254","建设单位负责人",3),
企业管理员("ADMIN","248","企业管理员",3),
建设单位("CONSTRUCTION","249","建设单位",1),
安装单位("INSTALL","250","安装单位",1),
设计单位("DESIGN","251","设计单位",1),
监察单位("SUPERVISION","252","监察单位",1),
监检机构("MONITORING","253","监检机构",1);
private String key;
private String code;
private String name;
/**
* 1 公司 2 部门 3 人员
*/
private Integer type;
public static HashMap<String,String> map= new HashMap();
static {
for(OrgPersonEnum orgPersonEnum:OrgPersonEnum.values()){
map.put(orgPersonEnum.getName(),orgPersonEnum.getKey());
}
}
}
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import java.util.HashMap;
import java.util.Map;
public enum ProjectInitiationEnum {
项目立项("1","项目立项"),
平台审核("2","平台审核"),
告知申请("3","告知申请"),
接受告知("4","接受告知"),
审查项目("5","审查项目"),
提交资料("6","提交资料"),
审批人审批("7","审批人审批"),
审核人审核("8","审核人审核"),
监检科室分配("9","监检科室分配"),
监检员分配("10","监检员分配"),
监检员审核("11","监检员审核"),
项目关闭("12","项目关闭"),
接受审查意见("13","接受审查意见");
private String status;
private String name;
public static Map<String,String> getNameByStatusMap = new HashMap<String,String>();
public static Map<String,String> getStatusByNameMap = new HashMap<String,String>();
static {
for(ProjectInitiationEnum projectInitiationEnum:ProjectInitiationEnum.values()){
getNameByStatusMap.put(projectInitiationEnum.status,projectInitiationEnum.name);
getStatusByNameMap.put(projectInitiationEnum.name, projectInitiationEnum.status);
}
}
ProjectInitiationEnum(String status, String name) {
this.status = status;
this.name = name;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import java.util.HashMap;
import java.util.Map;
public enum ProjectResourceEnum {
焊工资源("焊工","welder"),
设备资源("设备","equipment"),
管材资源("管材","material");
private String status;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
ProjectResourceEnum(String status, String state) {
this.status = status;
this.state = state;
}
private String state;
public static final Map<String,String> map=new HashMap<>();
static {
for (ProjectResourceEnum projectResourceEnum:ProjectResourceEnum.values()){
map.put(projectResourceEnum.status, projectResourceEnum.state);
}
}
}
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import java.security.PublicKey;
import java.util.HashMap;
import java.util.Map;
/**
* 焊口编码赋码状态
*/
public enum WeldCodeEnum {
赋值状态1("未赋值","0","codingStatus"),
赋值状态2("已赋值","1","codingStatus");
private String status;
private String state;
private String IState;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getIState() {
return IState;
}
public void setIState(String IState) {
this.IState = IState;
}
WeldCodeEnum(String status, String state, String IState) {
this.status = status;
this.state = state;
this.IState = IState;
}
public static final Map<String,String> map=new HashMap<>();
static{
for (WeldCodeEnum weldCodeEnum:WeldCodeEnum.values()){
map.put(weldCodeEnum.getState(),weldCodeEnum.getStatus());
}
}
}
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import java.util.HashMap;
import java.util.Map;
/**
* 焊口编码赋码方式
*/
public enum WeldMethodEnum {
赋码方式1("自动赋码", "0", "codingMethod"),
赋码方式2("手动赋码", "1", "codingMethod");
private String status;
private String state;
private String IState;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getIState() {
return IState;
}
public void setIState(String IState) {
this.IState = IState;
}
WeldMethodEnum(String status, String state, String IState) {
this.status = status;
this.state = state;
this.IState = IState;
}
public static final Map<String, String> map = new HashMap<>();
static {
for (WeldMethodEnum weldMethodEnum : WeldMethodEnum.values()) {
map.put(weldMethodEnum.getState(), weldMethodEnum.getStatus());
}
}
}
package com.yeejoin.amos.boot.module.ugp.api.Enum;
public enum noticeStatusEnum {
已提交("已提交","0"),
已接收("已接收","1"),
已退回("已退回","2");
String name;
String statusId;
noticeStatusEnum(String name, String statusId) {
this.name = name;
this.statusId = statusId;
}
}
package com.yeejoin.amos.boot.module.ugp.api.Util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* <pre>
* 返回封装对象
* </pre>
*
* @author mincx
* @version CommonReponse.java v0.1
* @time 2017-9-19 15:43:32
*/
public class CommonResponse implements Serializable {
private static final long serialVersionUID = -8737351878134480646L;
/**
* 操作状态
*/
@ApiModelProperty(required=true,value="操作状态")
private String result;
/**
* 操作状态
*/
@ApiModelProperty(required=true,value="状态码")
private int status;
/**
* 数据
*/
@ApiModelProperty(required=false,value="数据")
private Object dataList;
/**
* 操作详细信息
*/
@ApiModelProperty(required=false,value="操作详细信息")
private String message;
public CommonResponse(){
}
public CommonResponse(String result) {
this.result = result;
}
public CommonResponse(Object dataList) {
this.dataList = dataList;
this.result = "";
}
public CommonResponse(String result, Object dataList) {
this.dataList = dataList;
this.result = result;
}
public CommonResponse(String result, String message) {
this.result = result;
this.message = message;
}
public CommonResponse(String result, Object dataList, String message) {
this.dataList = dataList;
this.result = result;
this.message = message;
}
public CommonResponse(String result, Object dataList, int status) {
this.dataList = dataList;
this.result = result;
this.status = status;
}
public CommonResponse(String result, String message, int status) {
this.result = result;
this.message = message;
this.status = status;
}
public CommonResponse(String result, Object dataList, String message, int status) {
this.dataList = dataList;
this.result = result;
this.message = message;
this.status = status;
}
public Boolean isSuccess(){
return "SUCCESS".equals(getResult());
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Object getDataList() {
return dataList;
}
public void setDataList(Object dataList) {
this.dataList = dataList;
}
public void setStatus(int status) {
this.status = status;
}
public int getStatus() {
return status;
}
public String toJsonStr() throws Exception {
return JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,SerializerFeature.DisableCircularReferenceDetect,SerializerFeature.SkipTransientField);
}
}
package com.yeejoin.amos.boot.module.ugp.api.Util;
import org.springframework.http.HttpStatus;
public class CommonResponseUtil
{
public static CommonResponse success()
{
CommonResponse response = new CommonResponse();
response.setResult(Constants.RESULT_SUCCESS);
response.setStatus(HttpStatus.OK.value());
return response;
}
public static CommonResponse success(Object obj)
{
CommonResponse response = new CommonResponse();
response.setResult(Constants.RESULT_SUCCESS);
response.setStatus(HttpStatus.OK.value());
response.setDataList(obj);
return response;
}
public static CommonResponse success(Object obj, String message)
{
CommonResponse response = new CommonResponse();
response.setResult(Constants.RESULT_SUCCESS);
response.setStatus(HttpStatus.OK.value());
response.setDataList(obj);
response.setMessage(message);
return response;
}
public static CommonResponse failure()
{
CommonResponse response = new CommonResponse();
response.setResult(Constants.RESULT_FAILURE);
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
return response;
}
public static CommonResponse failure(String message)
{
CommonResponse response = new CommonResponse();
response.setResult(Constants.RESULT_FAILURE);
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
response.setMessage(message);
return response;
}
public static CommonResponse failure(Object obj, String message)
{
CommonResponse response = new CommonResponse();
response.setResult(Constants.RESULT_FAILURE);
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
response.setDataList(obj);
response.setMessage(message);
return response;
}
}
package com.yeejoin.amos.boot.module.ugp.api.Util;
/**
* <pre>
* 系统常量
* </pre>
*
* @author mincx
* @version Constants.java v0.1
* @time 2017-9-19 15:43:32
*/
public class Constants {
public static final String ERROR_MESSAGE = "系统异常";
public static final String RESULT_SUCCESS = "SUCCESS";
public static final String RESULT_FAILURE = "FAILURE";
public static final String RULE_FACT_PREFIX = "rule_";
public static final String RULE_COMPILATION_ERROR = "规则编译异常";
public static final String NEW_LINE= "\r\n";
public static final String POSITION_LATITUDE = "latitude";
public static final String POSITION_LONGITUDE = "longitude";
public static final double PI = 3.1415;
public static final double EARTH_RADIUS = 6370.996;
public static final String RULE_CONDITION_AND = "&&";
public static final String RULE_CONDITION_OR = "||";
/**
* DES加密解密默认key
*/
public static final String XSS_KEY = "qaz";
/**
* 灾情状态
*/
public static final String FireHappenStateID = "90db70b7-49a4-4a72-b54b-0fabbed9bec7";//发生
public static final String FireDevelopStateID = "1f7fe7d7-b30c-4518-8c95-6e3bc506ca86";//猛烈
/**
* 车辆状态
*/
public static final String CarArrivedStateID = "ad55748a-1206-4507-8831-95b7f2ad804f";//到达
public static final String CarDispatchingStateID = "43a23576-3d0f-4c3d-a46b-555391a4d870";//待出动
public static final String CarOnDutyStateID = "21cc717f-60b4-46ae-942e-9efd63d13415";//执勤
public static final String CarOnSiteStateID = "d7eddc16-4c55-4de0-b726-3547c7b0b980";//在位
public static final String CarOnTheWayStateID = "5e1b6e98-d1dc-4c49-a7ad-b959d2278dba";//在途
public static final String CarRepairStateID = "e86d455b-e9fd-4938-9826-38ca46623287";//维修
/**
* 战斗力量编队状态
*/
public static final String RescuePowerArrivedStateID = "0951f770-7f75-43d8-bcec-47d7559be727";//到达
public static final String RescuePowerDispatchedStateID = "ec4afc56-6cec-41a3-95f5-20c735f052d4";//已调派
public static final String RescuePowerEnhanceStateID = "3d6cf113-b69d-47c3-a3a8-ded448cc4636";//增援
public static final String RescuePowerFightingStateID = "4bacd4b4-b07d-454e-b737-431e7c997cde";//战斗
public static final String RescuePowerStandByStateID = "4fc6e4d6-c6a8-453c-b554-ce7de0b828b2";//待命
/**
* sql注入关键字
*/
public static String badStr = "'|and|exec|execute|insert|select|delete|update|count|drop|%|chr|mid|master|truncate|" +
"char|declare|sitename|net user|xp_cmdshell|;|or|-|+|,|like'|and|exec|execute|insert|create|drop|" +
"table|from|grant|use|group_concat|column_name|" +
"information_schema.columns|table_schema|union|where|select|delete|update|order|by|count|" +
"chr|mid|master|truncate|char|declare|or|;|-|--|,|like|//|/|%|#";
}
package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
......@@ -20,6 +21,8 @@ public class CompanyDto extends BaseDto {
private static final long serialVersionUID = 1L;
Company company;
@ApiModelProperty(value = "企业名称")
private String name;
......
package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.xml.soap.Text;
/**
* 安装告知表
*
* @author system_generator
* @date 2022-09-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="InstallNoticePageDto", description="安装告知表")
public class InstallNoticePageDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "项目名称")
private String name;
@ApiModelProperty(value = "项目安装区域")
private String installRegion;
@ApiModelProperty(value = "建设单位")
private String constructionUnit;
@ApiModelProperty(value = "建设单位负责人")
private String chargePerson;
@ApiModelProperty(value = "安装单位")
private String installationUnit;
@ApiModelProperty(value = "安装负责人")
private String installPri;
@ApiModelProperty(value = "监察部门")
private String superviseDeptId;
@ApiModelProperty(value = "监察负责人")
private String chargerPersonId;
@ApiModelProperty(value = "监检机构")
private String inspectionOrgId;
@ApiModelProperty(value = "附件查看")
private Text info;
@ApiModelProperty(value = "告知申请状态")
private String noticeStatus;
@ApiModelProperty(value = "告知申请提交日期")
private String noticeDate;
}
package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author cpp
* @Description
* @Date 2022/10/10
*/
@Data
public class PercentOfPassDto extends BaseDto {
@ApiModelProperty(value = "项目id")
private Long projectId;
@ApiModelProperty(value = "合格率")
private String percentOfPass;
@ApiModelProperty(value = "监理单位")
private String currentUnit;
@ApiModelProperty(value = "项目名称")
private String name;
@ApiModelProperty(value = "项目地点")
private String address;
@ApiModelProperty(value = "项目进度")
private String progressStatus;
@ApiModelProperty(value = "建设单位名称")
private String constructionUnit;
@ApiModelProperty(value = "建设单位负责人名称")
private String chargePerson;
@ApiModelProperty(value = "项目开工日期")
private Date startDate;
@ApiModelProperty(value = "项目提交日期")
private Date submitDate;
@ApiModelProperty(value = "刷新")
private String refresh;
}
......@@ -75,7 +75,14 @@ public class ProjectDto extends BaseDto {
@ApiModelProperty(value = "项目提交日期")
private Date submitDate;
@ApiModelProperty(value = "流程id")
private String instanceId;
@ApiModelProperty(value = "流程状态")
private String status;
@ApiModelProperty(value = "备注")
private String remark;
}
package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@Data
@ApiModel(value="ProjectInitiationDto", description="项目立项流程日志表")
public class ProjectInitiationDto extends BaseDto {
@TableField("instance_id")
private String instanceId;
@TableField("task_id")
private String taskId;
@TableField("task_name")
private String taskName;
@TableField("executor")
private String executor;
@TableField("context")
private String context;
}
......@@ -11,7 +11,7 @@ import java.util.Date;
* 质量问题表
*
* @author system_generator
* @date 2022-09-22
* @date 2022-09-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
......@@ -21,7 +21,7 @@ public class QualityProblemDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "企业id")
@ApiModelProperty(value = "项目id")
private Long projectId;
@ApiModelProperty(value = "质量问题编号")
......@@ -30,31 +30,52 @@ public class QualityProblemDto extends BaseDto {
@ApiModelProperty(value = "问题产生阶段")
private String generateStage;
@ApiModelProperty(value = "问题描述")
private String desc;
@ApiModelProperty(value = "问题等级")
private String level;
@ApiModelProperty(value = "产生问题的阶段对应检验信息id")
private Long stageVerifyId;
@ApiModelProperty(value = "处理进度")
private String processProgress;
@ApiModelProperty(value = "整改书提交状态")
private String submitStatus;
@ApiModelProperty(value = "整改书提交状态(1已提交/0未提交)")
private Boolean submitStatus;
@ApiModelProperty(value = "提交日期")
@ApiModelProperty(value = "问题提交日期")
private Date submitDate;
@ApiModelProperty(value = "复核日期")
private Date reviewDate;
@ApiModelProperty(value = "问题分类(1继续整改/2转问题处理单)")
private Boolean problemType;
@ApiModelProperty(value = "审查项目是否存在问题(1是/0否)")
private Boolean reviewStatus;
@ApiModelProperty(value = "复核状态")
private String reviewStatus;
@ApiModelProperty(value = "处理方案(附件上传)")
private String solution;
@ApiModelProperty(value = "复核方式")
private String reviewType;
@ApiModelProperty(value = "处理方案说明")
private String solutionDesc;
@ApiModelProperty(value = "监检意见")
private String inspectOpinion;
@ApiModelProperty(value = "处理意见(附件上传)")
private String handingOpinion;
@ApiModelProperty(value = "整改书")
@ApiModelProperty(value = "处理意见说明")
private String handingOpinionDesc;
@ApiModelProperty(value = "整改书(附件上传)")
private String reformDoc;
@ApiModelProperty(value = "质量问题描述")
private String desc;
@ApiModelProperty(value = "整改书说明")
private String reformDesc;
@ApiModelProperty(value = "整改期限")
private Date reformLimitDate;
@ApiModelProperty(value = "是否限期内整改(1是/0否)")
private Boolean rectifyWithinTime;
}
......@@ -27,9 +27,13 @@ public class WeldDto extends BaseDto {
@ApiModelProperty(value = "项目id")
private Long projectId;
private String name;
@ApiModelProperty(value = "安装单位id")
private Long installCompany;
private String installationUnit;
@ApiModelProperty(value = "所在地")
private String region;
......@@ -45,4 +49,8 @@ public class WeldDto extends BaseDto {
@ApiModelProperty(value = "赋码日期")
private Date codingDate;
}
package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.awt.*;
import java.util.Date;
/**
* 焊口信息表
*
* @author system_generator
* @date 2022-09-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="WelderDto", description="焊工表")
public class WelderDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "焊工姓名")
private String name;
@ApiModelProperty(value = "身份证号码")
private String idNumber;
@ApiModelProperty(value = "联系电话")
private String phone;
@ApiModelProperty(value = "持证项目")
private String licensedProject;
@ApiModelProperty(value = "证书编号")
private String certNumber;
@ApiModelProperty(value = "发证部门")
private String licenseDept;
@ApiModelProperty(value = "证书有效期")
private Date certValidDate;
@ApiModelProperty(value = "常用地址")
private String address;
@ApiModelProperty(value = "证书类型")
private String certType;
@ApiModelProperty(value = "考试机构")
private String examOrg;
@ApiModelProperty(value = "持证批次")
private String licensedNum;
@ApiModelProperty(value = "档案编号")
private String fileNumber;
@ApiModelProperty(value = "图片")
private Image image;
}
......@@ -100,4 +100,16 @@ public class Company extends BaseEntity {
@TableField("org_code")
private String orgCode;
/**
* 企业管理员
*/
@TableField("admin")
private String admin;
/**
* 企业管理员电话
*/
@TableField("admin_phone")
private String adminPhone;
}
......@@ -71,6 +71,12 @@ public class InstallNotice extends BaseEntity {
private String contractAttch;
/**
* 安装负责人
*/
@TableField("install_pri")
private String installPri;
/**
* 许可证文件
*/
@TableField("license_attch")
......
......@@ -132,6 +132,18 @@ public class Project extends BaseEntity {
private Date submitDate;
/**
* 流程id
*/
@TableField("instance_id")
private String instanceId;
/**
* 流程状态
*/
@TableField("status")
private String status;
/**
* 备注
*/
@TableField("remark")
......
package com.yeejoin.amos.boot.module.ugp.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_ugp_project_initiation_log")
public class ProjectInitiation extends BaseEntity {
@TableField("instance_id")
private String instanceId;
@TableField("task_id")
private String taskId;
@TableField("task_name")
private String taskName;
@TableField("executor")
private String executor;
@TableField("context")
private String context;
}
......@@ -23,7 +23,7 @@ public class QualityInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 企业id
* 项目id
*/
@TableField("project_id")
private Long projectId;
......@@ -40,4 +40,8 @@ public class QualityInfo extends BaseEntity {
@TableField("supervisory_unit_id")
private Long supervisoryUnitId;
//项目表
private Project project;
}
......@@ -12,7 +12,7 @@ import java.util.Date;
* 质量问题表
*
* @author system_generator
* @date 2022-09-22
* @date 2022-09-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
......@@ -23,7 +23,7 @@ public class QualityProblem extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 企业id
* 项目id
*/
@TableField("project_id")
private Long projectId;
......@@ -41,57 +41,99 @@ public class QualityProblem extends BaseEntity {
private String generateStage;
/**
* 问题描述
*/
@TableField("desc")
private String desc;
/**
* 问题等级
*/
@TableField("level")
private String level;
/**
* 产生问题的阶段对应检验信息id
*/
@TableField("stage_verify_id")
private Long stageVerifyId;
/**
* 处理进度
*/
@TableField("process_progress")
private String processProgress;
/**
* 整改书提交状态
* 整改书提交状态(1已提交/0未提交)
*/
@TableField("submit_status")
private String submitStatus;
private Boolean submitStatus;
/**
* 提交日期
* 问题提交日期
*/
@TableField("submit_date")
private Date submitDate;
/**
* 复核日期
* 问题分类(1继续整改/2转问题处理单)
*/
@TableField("review_date")
private Date reviewDate;
@TableField("problem_type")
private Boolean problemType;
/**
* 复核状态
* 审查项目是否存在问题(1是/0否)
*/
@TableField("review_status")
private String reviewStatus;
private Boolean reviewStatus;
/**
* 复核方式
* 处理方案(附件上传)
*/
@TableField("review_type")
private String reviewType;
@TableField("solution")
private String solution;
/**
* 监检意见
* 处理方案说明
*/
@TableField("inspect_opinion")
private String inspectOpinion;
@TableField("solution_desc")
private String solutionDesc;
/**
* 整改书
* 处理意见(附件上传)
*/
@TableField("handing_opinion")
private String handingOpinion;
/**
* 处理意见说明
*/
@TableField("handing_opinion_desc")
private String handingOpinionDesc;
/**
* 整改书(附件上传)
*/
@TableField("reform_doc")
private String reformDoc;
/**
* 质量问题描述
* 整改书说明
*/
@TableField("desc")
private String desc;
@TableField("reform_desc")
private String reformDesc;
/**
* 整改期限
*/
@TableField("reform_limit_date")
private Date reformLimitDate;
/**
* 是否限期内整改(1是/0否)
*/
@TableField("rectify_within_time")
private Boolean rectifyWithinTime;
}
package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
/**
* 企业信息表 Mapper 接口
......@@ -10,5 +10,4 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2022-09-22
*/
public interface CompanyMapper extends BaseMapper<Company> {
}
package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ugp.api.dto.PercentOfPassDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.QualityInfo;
import java.util.List;
public interface IInstallationQualityMapper extends BaseMapper<QualityInfo> {
List<QualityInfo> findss();
}
package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* 安装告知表 Mapper 接口
......@@ -10,5 +20,17 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2022-09-22
*/
public interface InstallNoticeMapper extends BaseMapper<InstallNotice> {
//安装告知申请页面列表
List<InstallNoticePageDto> installNoticeList();
//筛选sequenceNbr查询安装告知申请页面数据
List<InstallNoticePageDto> selectByName(@Param("name") String name , @Param("unit") String unit);
//根据
InstallNoticePageDto selectById(@Param("sequenceNbr")Long sequenceNbr);
//安装告知申请页面分页列表
Page<InstallNoticePageDto> installNoticePage(IPage<InstallNoticePageDto> page);
//根据sequenceNbr查询告知申请详情
InstallNoticeDto selectoneById(@RequestParam("sequenceNbr")Long sequenceNbr );
}
package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.ProjectInitiation;
public interface ProjectInitiationMapper extends BaseMapper<ProjectInitiation> {
}
......@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* 质量问题表 Mapper 接口
*
* @author system_generator
* @date 2022-09-22
* @date 2022-09-29
*/
public interface QualityProblemMapper extends BaseMapper<QualityProblem> {
......
package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Weld;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 焊口信息表 Mapper 接口
......@@ -9,6 +14,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @date 2022-09-22
*/
@Mapper
public interface WeldMapper extends BaseMapper<Weld> {
@Select ("select project_id,super_inspec_status from tz_ugp_weld where project_id =#{projectId}")
List<WeldDto> select(Long projectId);
}
package com.yeejoin.amos.boot.module.ugp.api.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
/**
* 企业信息表接口类
*
......@@ -9,4 +12,6 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
*/
public interface ICompanyService {
void modifyCompanyInfo(Company company) throws Exception;
}
package com.yeejoin.amos.boot.module.ugp.api.service;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 安装告知表接口类
*
......@@ -8,5 +12,12 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
* @date 2022-09-22
*/
public interface IInstallNoticeService {
//安装告知页面列表
List<InstallNoticePageDto> installNoticeList();
//安装告知页面分页查询
List<InstallNoticePageDto> selectByName(@Param("name") String name ,@Param("unit") String unit);
//根据sequenceNbr查询列表数据
InstallNoticePageDto selectById(@Param("sequenceNbr")Long sequenceNbr);
}
package com.yeejoin.amos.boot.module.ugp.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.PercentOfPassDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Weld;
import java.util.List;
public interface IInstallationQualityService {
Page<PercentOfPassDto> find(Page<PercentOfPassDto> page,PercentOfPassDto percentOfPassDto);
}
package com.yeejoin.amos.boot.module.ugp.api.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
public interface IProjectInitiationService {
/**
* 流程启动
* @return 返回instanceId ,加入项目信息表中
* @throws Exception
*/
void start(Project project);
/**
* 执行流程节点,并记录日志
*/
void execute(String instanceId, Object object, String option);
}
......@@ -5,7 +5,7 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
* 质量问题表接口类
*
* @author system_generator
* @date 2022-09-22
* @date 2022-09-29
*/
public interface IQualityProblemService {
......
package com.yeejoin.amos.boot.module.ugp.api.service;
import com.yeejoin.amos.boot.module.ugp.api.entity.Weld;
import java.util.List;
/**
* 焊口信息表接口类
*
......@@ -8,5 +12,5 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
* @date 2022-09-22
*/
public interface IWeldService {
List<Weld> getCode(Long projectCode, int number);
}
<?xml version="1.0" encoding="UTF-8"?>
<!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.ugp.api.mapper.InstallNoticeMapper">
<!-- 查询安装告知申请列表-->
<select id="installNoticeList" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
</select>
<!-- 安装告知申请列表按name,unit筛选-->
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_project.name = #{name} and construction_unit = #{unit}
and tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
</select>
<!-- 通过id查询页面数据-->
<select id="selectById" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
AND tz_ugp_project.sequence_nbr=#{sequenceNbr}
</select>
<!-- 查询安装告知申请页面-->
<select id="installNoticePage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.sequence_nbr,tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
</select>
<!-- selectoneById-->
<select id="selectoneById" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto">
SELECT*
FROM tz_ugp_install_notice
WHERE sequence_nbr=#{sequenceNbr};
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!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.ugp.api.mapper.IInstallationQualityMapper">
<resultMap id="result" type="com.yeejoin.amos.boot.module.ugp.api.entity.QualityInfo">
<result property="projectId" column="project_id" jdbcType="INTEGER"/>
<result property="supervisoryUnitId" column="supervisory_unit_id" jdbcType="INTEGER"/>
<association property="project" javaType="com.yeejoin.amos.boot.module.ugp.api.entity.Project" >
<!--@Table tz_ugp_project-->
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="progressStatus" column="progress_status" jdbcType="VARCHAR"/>
<result property="address" column="address" jdbcType="VARCHAR"/>
<result property="startDate" column="start_date" jdbcType="OTHER"/>
<result property="constructionUnit" column="construction_unit" jdbcType="VARCHAR"/>
<result property="chargePerson" column="charge_person" jdbcType="VARCHAR"/>
<result property="submitDate" column="submit_date" jdbcType="OTHER"/>
</association>
</resultMap>
<select id="findss" resultMap="result">
select
pt.name ,
pt.address ,
pt.progress_status ,
qy.supervisory_unit_id ,
qy.project_id,
pt.construction_unit ,
pt.charge_person ,
pt.start_date ,
pt.submit_date
from
tz_ugp_quality_info qy ,
tz_ugp_project pt
where
qy.project_id=pt.sequence_nbr
and
qy.is_delete =0
and
pt.is_delete=0
</select>
</mapper>
\ No newline at end of file
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
import com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.util.DesUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
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.*;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.CompanyServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -30,13 +52,22 @@ public class CompanyController extends BaseController {
@Autowired
CompanyServiceImpl companyServiceImpl;
@Autowired(required = false)
CompanyMapper companyMapper;
@Autowired
OrgUsrServiceImpl iOrgUsrService;
@Autowired
OrgServiceImpl orgServiceImpl;
@Value("${amos.secret.key}")
String secretKey;
/**
* 新增企业信息表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增企业信息表", notes = "新增企业信息表")
public ResponseModel<CompanyDto> save(@RequestBody CompanyDto model) {
......@@ -50,7 +81,7 @@ public class CompanyController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新企业信息表", notes = "根据sequenceNbr更新企业信息表")
public ResponseModel<CompanyDto> updateBySequenceNbrCompany(@RequestBody CompanyDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
......@@ -64,7 +95,7 @@ public class CompanyController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除企业信息表", notes = "根据sequenceNbr删除企业信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
......@@ -77,7 +108,7 @@ public class CompanyController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个企业信息表", notes = "根据sequenceNbr查询单个企业信息表")
public ResponseModel<CompanyDto> selectOne(@PathVariable Long sequenceNbr) {
......@@ -91,7 +122,7 @@ public class CompanyController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "企业信息表分页查询", notes = "企业信息表分页查询")
public ResponseModel<Page<CompanyDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
......@@ -113,4 +144,104 @@ public class CompanyController extends BaseController {
public ResponseModel<List<CompanyDto>> selectForList() {
return ResponseHelper.buildResponse(companyServiceImpl.queryForCompanyList());
}
/**
* 修改企业信息
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "Post",value = "修改企业信息", notes = "修改企业信息")
@PostMapping(value = "/modifyCompanyInfo")
public ResponseModel<String> modifyCompanyInfo(@RequestBody CompanyDto company) throws Exception {
companyServiceImpl.updateById(company.getCompany());
return ResponseHelper.buildResponse("ok");
}
/**
* 查看企业信息详情
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET",value = "查看企业信息详情", notes = "查看企业信息详情")
@GetMapping(value = "/getCompanyInfo")
public ResponseModel<Company> getCompanyInfo(Company companyList) {
// Company company;
// QueryWrapper<Company> lambdaQueryWrapper=new QueryWrapper<>();
// lambdaQueryWrapper.eq("name",companyList.getName());
// company= companyMapper.selectOne(lambdaQueryWrapper);
return ResponseHelper.buildResponse(companyMapper.selectById(companyList));
}
/**
* 企业审核
* 根据sequenceNbr更新,审核通过后的企业调用平台接口创建单位及管理员,并存业务的cb_org_usr表
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping(value = "check")
@ApiOperation(httpMethod = "POST", value = "根据sequenceNbr更新,并创建单位及管理员", notes = "根据sequenceNbr更新,并创建单位及管理员")
public ResponseModel<Boolean> companyCheck(@RequestBody CompanyDto model,Long sequenceNbr,String bizOrgType) throws Exception{
Company company = companyServiceImpl.getById(sequenceNbr);
company.setApproved(model.getApproved());
if (company.getApproved().equals("已审核")){
final CompanyModel companyModel = new CompanyModel();
final AgencyUserModel agencyUserModel = new AgencyUserModel();
//创建平台企业
companyModel.setCompanyName(company.getName());
companyModel.setCompanyCode(company.getCreditCode());
companyModel.setAddress(company.getAddress());
companyModel.setParentId(0L);
companyModel.setLevel("headquarter");
companyModel.setAgencyCode("ugp");
final CompanyModel companyModelFeignClient = Privilege.companyClient.create(companyModel).getResult();
//创建平台用户
String admin = company.getAdmin();
String adminPhone = company.getAdminPhone();
agencyUserModel.setRealName(admin);
agencyUserModel.setMobile(company.getContactPhone());
agencyUserModel.setAgencyCode("ugp");
agencyUserModel.setLockStatus("UNLOCK");
agencyUserModel.setMobile(adminPhone);
agencyUserModel.setCreateTime(new Date());
agencyUserModel.setUserName(admin);
agencyUserModel.setPassword(DesUtil.encode(adminPhone, secretKey));
agencyUserModel.setRePassword(DesUtil.encode(adminPhone, secretKey));
Privilege.agencyUserClient.create(agencyUserModel);
//企业动态表单存储
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(company));
jsonObject.put("amosOrgId",companyModelFeignClient.getSequenceNbr());
jsonObject.put("amosOrgCode",companyModelFeignClient.getOrgCode());
orgServiceImpl.dataHandling(jsonObject,bizOrgType,null);
//企业管理员人员 动态表单存储
jsonObject = null;
jsonObject.put("name",admin);
jsonObject.put("phone",adminPhone);
orgServiceImpl.dataHandling(jsonObject, OrgEnum.企业管理员.getKey(),null);
}
return ResponseHelper.buildResponse(companyServiceImpl.updateById(company));
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping(value = "test")
@ApiOperation(httpMethod = "Post", value = "根据sequenceNbr更新,并创建单位及管理员", notes = "根据sequenceNbr更新,并创建单位及管理员")
public ResponseModel<OrgUsrDto> getInfo(@RequestBody JSONObject jsonObject, String bizOrgType,String sequenceNbr){
return ResponseHelper.buildResponse(orgServiceImpl.dataHandling(jsonObject,bizOrgType,sequenceNbr));
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
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 com.yeejoin.amos.boot.module.ugp.biz.service.impl.EquipmentServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto;
......@@ -37,28 +42,28 @@ public class EquipmentController extends BaseController {
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增设备信息表", notes = "新增设备信息表")
public ResponseModel<EquipmentDto> save(@RequestBody EquipmentDto model) {
model = equipmentServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增设备信息表", notes = "新增设备信息表")
public ResponseModel<EquipmentDto> save(@RequestBody EquipmentDto model) {
model = equipmentServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新设备信息表", notes = "根据sequenceNbr更新设备信息表")
public ResponseModel<EquipmentDto> updateBySequenceNbrEquipment(@RequestBody EquipmentDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(equipmentServiceImpl.updateWithModel(model));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新设备信息表", notes = "根据sequenceNbr更新设备信息表")
public ResponseModel<EquipmentDto> updateBySequenceNbrEquipment(@RequestBody EquipmentDto model, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(equipmentServiceImpl.updateWithModel(model));
}
/**
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
......@@ -67,50 +72,62 @@ public class EquipmentController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除设备信息表", notes = "根据sequenceNbr删除设备信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(equipmentServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个设备信息表", notes = "根据sequenceNbr查询单个设备信息表")
public ResponseModel<EquipmentDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(equipmentServiceImpl.queryBySeq(sequenceNbr));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个设备信息表", notes = "根据sequenceNbr查询单个设备信息表")
public ResponseModel<EquipmentDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(equipmentServiceImpl.queryBySeq(sequenceNbr));
}
/**
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "设备信息表分页查询", notes = "设备信息表分页查询")
public ResponseModel<Page<EquipmentDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<EquipmentDto> page = new Page<EquipmentDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(equipmentServiceImpl.queryForEquipmentPage(page));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "设备信息表分页查询", notes = "设备信息表分页查询")
public ResponseModel<Page<EquipmentDto>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) {
Page<EquipmentDto> page = new Page<EquipmentDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(equipmentServiceImpl.queryForEquipmentPage(page));
}
/**
* 列表全部数据查询
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "设备信息表列表全部数据查询", notes = "设备信息表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<EquipmentDto>> selectForList() {
return ResponseHelper.buildResponse(equipmentServiceImpl.queryForEquipmentList());
}
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "设备信息表列表全部数据查询", notes = "设备信息表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<EquipmentDto>> selectForList() {
return ResponseHelper.buildResponse(equipmentServiceImpl.queryForEquipmentList());
}
/**
* 设备数据名称查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "设备数据名称查询", notes = "设备数据名称查询")
@GetMapping(value = "/selectName")
public ResponseModel<List<JSONObject>> selectName(@RequestParam(value = "unitId")String installationUnitId) {
return ResponseHelper.buildResponse(equipmentServiceImpl.selectName(installationUnitId));
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.PercentOfPassDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Weld;
import com.yeejoin.amos.boot.module.ugp.api.service.IInstallationQualityService;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.InstallationQualityImpl;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.WeldServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import javax.annotation.Resource;
import java.util.List;
/**
* 质量问题闭环管理-安装质量监检信息-质量监检信息
*
* @author system_generator
* @date 2022-10-09
*/
@RestController
@Api(tags = "质量问题闭环管理-安装质量监检信息-质量监检信息Api")
@RequestMapping(value = "/install-quality")
public class InstallationQualityController extends BaseController {
@Resource
private InstallationQualityImpl services;
@Resource
private WeldServiceImpl weld;
//查看质量监检信息
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/find")
@ApiOperation(httpMethod = "GET", value = "质量问题闭环管理-安装质量监检信息-质量监检信息", notes = "质量问题闭环管理-安装质量监检信息-质量监检信息")
public ResponseModel<Page<PercentOfPassDto>> find(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size,PercentOfPassDto percentOfPassDto) {
Page<PercentOfPassDto> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(services.find(page,percentOfPassDto));
}
//通过projectId查询焊口信息
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/selectByProjectId/{projectId}")
@ApiOperation(httpMethod = "get", value = "焊口信息", notes = "焊口信息")
public ResponseModel<List<WeldDto>> selectByProjectId(@PathVariable("projectId") Long projectId) {
if (projectId == null) {
return null;
}
return ResponseHelper.buildResponse(weld.getProjectId (projectId));
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
......@@ -113,4 +114,29 @@ public class MaterialController extends BaseController {
public ResponseModel<List<MaterialDto>> selectForList() {
return ResponseHelper.buildResponse(materialServiceImpl.queryForMaterialList());
}
// /**
// * 根据项目id查询材料信息
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
// @ApiOperation(httpMethod = "GET",value = "根据项目id查询材料信息", notes = "根据项目id查询材料信息")
// @GetMapping(value = "/selectMess")
// public ResponseModel<MaterialDto> selectMess(@RequestParam String companyId ) {
// return ResponseHelper.buildResponse(materialServiceImpl.selectMess(companyId));
// }
/**
* 材料信息表列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "材料信息表列表全部数据查询", notes = "材料信息表列表全部数据查询")
@GetMapping(value = "/selectName")
public ResponseModel<List<JSONObject>> selectName(@RequestParam(value = "unitId")String installationUnitId) {
return ResponseHelper.buildResponse(materialServiceImpl.selectName(installationUnitId));
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectInitiationServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.Date;
import java.util.List;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -30,6 +38,10 @@ public class ProjectController extends BaseController {
@Autowired
ProjectServiceImpl projectServiceImpl;
@Autowired
ProjectInitiationServiceImpl projectInitiationService;
@Autowired
OrgServiceImpl orgServiceImpl;
/**
* 新增项目信息表
......@@ -40,7 +52,12 @@ public class ProjectController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增项目信息表", notes = "新增项目信息表")
public ResponseModel<ProjectDto> save(@RequestBody ProjectDto model) {
model.setStartDate(new Date());
model.setSubmitDate(new Date());
model = projectServiceImpl.createWithModel(model);
Project project = new Project();
BeanUtils.copyProperties(model, project);
projectInitiationService.start(project);
return ResponseHelper.buildResponse(model);
}
......@@ -54,7 +71,8 @@ public class ProjectController extends BaseController {
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新项目信息表", notes = "根据sequenceNbr更新项目信息表")
public ResponseModel<ProjectDto> updateBySequenceNbrProject(@RequestBody ProjectDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
model.setRecDate(new Date());
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(projectServiceImpl.updateWithModel(model));
}
......@@ -113,4 +131,36 @@ public class ProjectController extends BaseController {
public ResponseModel<List<ProjectDto>> selectForList() {
return ResponseHelper.buildResponse(projectServiceImpl.queryForProjectList());
}
/**
* 查询项目名称
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "查询项目名称", notes = "查询项目名称")
@GetMapping(value = "/selectName")
public ResponseModel<List<JSONObject>> selectName() {
return ResponseHelper.buildResponse(projectServiceImpl.selectName());
}
/**
* 获取下拉选择值
* @param type INSTALL("安装单位")、DESIGN("设计单位")、SUPERVISION(”监察单位“)、MONITORING(”监检机构“)
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "查询下拉选择框的值", notes = "查询下拉选择框的值")
@GetMapping(value = "/getSelectInfo")
public ResponseModel<List<OrgUsr>> getSelectInfo(String type){
return ResponseHelper.buildResponse(orgServiceImpl.getSelectInfo(type));
}
/**
* 查询当前登录单位下的人员列表
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "查询下拉选择框的值", notes = "查询下拉选择框的值")
@GetMapping(value = "/getCharge")
public ResponseModel<List<OrgUsr>> getCharge(){
return ResponseHelper.buildResponse(orgServiceImpl.getCharge());
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectInitiationServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ResponseHeader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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;
@RestController
@Api(tags = "流程相关")
@RequestMapping(value = "/projectInitiation")
public class ProjectInitiationController {
@Autowired
ProjectInitiationServiceImpl projectInitiationServiceImpl;
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/start")
@ApiOperation(httpMethod = "GET", value = "流程启动", notes = "流程启动")
public ResponseModel<String> start() throws Exception {
projectInitiationServiceImpl.start(new Project());
return ResponseHelper.buildResponse("ok");
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/execute/{instanceId}")
@ApiOperation(httpMethod = "GET", value = "流程启动", notes = "流程启动")
public ResponseModel<String> execute(@PathVariable("instanceId")String instanceId, Object object, String option) throws Exception {
projectInitiationServiceImpl.execute(instanceId,object,option);
return ResponseHelper.buildResponse("ok");
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
......@@ -164,4 +166,16 @@ public class ProjectResourceController extends BaseController {
this.projectResourceServiceImpl.welderDelete(ids);
return ResponseHelper.buildResponse(true);
}
/**
* 绑定设备跟项目
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "POST",value = "绑定设备跟项目", notes = "绑定设备跟项目")
@PostMapping(value = "/saveId")
public ResponseModel<ProjectResource> saveId(@RequestBody JSONObject jsonObject) {
return ResponseHelper.buildResponse(projectResourceServiceImpl.saveIds(jsonObject));
}
}
......@@ -21,7 +21,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
* 质量问题表
*
* @author system_generator
* @date 2022-09-22
* @date 2022-09-29
*/
@RestController
@Api(tags = "质量问题表Api")
......
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.ugp.api.entity.Weld;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
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 com.yeejoin.amos.boot.module.ugp.biz.service.impl.WeldServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
......@@ -37,28 +43,28 @@ public class WeldController extends BaseController {
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增焊口信息表", notes = "新增焊口信息表")
public ResponseModel<WeldDto> save(@RequestBody WeldDto model) {
model = weldServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增焊口信息表", notes = "新增焊口信息表")
public ResponseModel<WeldDto> save(@RequestBody WeldDto model) {
model = weldServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新焊口信息表", notes = "根据sequenceNbr更新焊口信息表")
public ResponseModel<WeldDto> updateBySequenceNbrWeld(@RequestBody WeldDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(weldServiceImpl.updateWithModel(model));
}
/**
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新焊口信息表", notes = "根据sequenceNbr更新焊口信息表")
public ResponseModel<WeldDto> updateBySequenceNbrWeld(@RequestBody WeldDto model, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(weldServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
......@@ -67,50 +73,62 @@ public class WeldController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除焊口信息表", notes = "根据sequenceNbr删除焊口信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(weldServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个焊口信息表", notes = "根据sequenceNbr查询单个焊口信息表")
public ResponseModel<WeldDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(weldServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个焊口信息表", notes = "根据sequenceNbr查询单个焊口信息表")
public ResponseModel<WeldDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(weldServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询+条件查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "焊口信息表分页查询", notes = "焊口信息表分页查询")
public ResponseModel<Page<WeldDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<WeldDto> page = new Page<WeldDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(weldServiceImpl.queryForWeldPage(page));
}
/**
* 列表全部数据查询
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "焊口信息表分页查询", notes = "焊口信息表分页查询")
public ResponseModel<Page<WeldDto>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size,String projectId) {
return ResponseHelper.buildResponse(weldServiceImpl.queryForWeldPage(current, size,projectId));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "焊口信息表列表全部数据查询", notes = "焊口信息表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<WeldDto>> selectForList() {
return ResponseHelper.buildResponse(weldServiceImpl.queryForWeldList());
}
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "焊口信息表列表全部数据查询", notes = "焊口信息表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<WeldDto>> selectForList() {
return ResponseHelper.buildResponse(weldServiceImpl.queryForWeldList());
}
/**
* 生成焊口编码
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "生成焊口编码", notes = "生成焊口编码")
@GetMapping(value = "/getCode")
public ResponseModel<List<Weld>> getCode(Long sequenceNbr, int number) {
return ResponseHelper.buildResponse(weldServiceImpl.getCode(sequenceNbr,number));
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderDto;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl;
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.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 java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@RestController
@Api(tags = "焊工信息")
@RequestMapping(value = "/welder")
public class WelderController extends BaseController {
@Autowired
OrgServiceImpl orgService;
/**
* 新增焊工信息
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/saveWelder", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增焊工信息", notes = "新增焊工信息")
public ResponseModel<Object> saveWelder(@RequestParam String isWelder, @RequestBody WelderDto welderDto) {
return ResponseHelper.buildResponse(null);
}
/**
* 获取焊工信息
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectWelder")
@ApiOperation(httpMethod = "GET", value = "新增焊工信息", notes = "新增焊工信息")
public ResponseModel<List<Map>> selectWelder(@RequestParam("unitId") String companyId) {
List<Map> info = orgService.getInfo(companyId);
return ResponseHelper.buildResponse(info);
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.ugp.api.entity.WorkHistory;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
import java.util.List;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.WorkHistoryServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -85,21 +91,50 @@ public class WorkHistoryController extends BaseController {
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
* 列表分页查询
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "焊工工作履历表分页查询", notes = "焊工工作履历表分页查询")
public ResponseModel<Page<WorkHistoryDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<WorkHistoryDto> page = new Page<WorkHistoryDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(workHistoryServiceImpl.queryForWorkHistoryPage(page));
@RequestMapping(value = "/page", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<IPage<WorkHistory>> listPage(String pageNum, String pageSize,
WorkHistory tzUgpWorkHistory){
Page<WorkHistory> pageBean;
QueryWrapper<WorkHistory> tzUgpWorkHistoryQueryWrapper = new QueryWrapper<>();
Class<? extends WorkHistory> aClass = tzUgpWorkHistory.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
field.setAccessible(true);
Object o = field.get(tzUgpWorkHistory);
if (o != null) {
Class<?> type = field.getType();
String name = NameUtils.camel2Underline(field.getName());
if (type.equals(Integer.class)) {
Integer fileValue = (Integer) field.get(tzUgpWorkHistory);
tzUgpWorkHistoryQueryWrapper.eq(name, fileValue);
} else if (type.equals(Long.class)) {
Long fileValue = (Long) field.get(tzUgpWorkHistory);
tzUgpWorkHistoryQueryWrapper.eq(name, fileValue);
} else if (type.equals(String.class)) {
String fileValue = (String) field.get(tzUgpWorkHistory);
tzUgpWorkHistoryQueryWrapper.eq(name, fileValue);
} else {
String fileValue = (String) field.get(tzUgpWorkHistory);
tzUgpWorkHistoryQueryWrapper.eq(name, fileValue);
}
}
}catch (Exception e) {
}
});
IPage<WorkHistory> page;
if (StringUtils.isBlank(pageNum) ||StringUtils.isBlank(pageSize)) {
pageBean = new Page<>(0, Long.MAX_VALUE);
}else{
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = workHistoryServiceImpl.page(pageBean, tzUgpWorkHistoryQueryWrapper);
return ResponseHelper.buildResponse(page);
}
/**
......
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.AbstractWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
import com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.ICompanyService;
import com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto;
import org.apache.lucene.queryparser.flexible.messages.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
/**
* 企业信息表服务实现类
......@@ -16,18 +26,28 @@ import java.util.List;
* @date 2022-09-22
*/
@Service
public class CompanyServiceImpl extends BaseService<CompanyDto,Company,CompanyMapper> implements ICompanyService {
public class CompanyServiceImpl extends BaseService<CompanyDto, Company, CompanyMapper> implements ICompanyService {
@Autowired
CompanyMapper companyMapper;
/**
* 分页查询
*/
public Page<CompanyDto> queryForCompanyPage(Page<CompanyDto> page) {
public Page<CompanyDto> queryForCompanyPage(Page<CompanyDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<CompanyDto> queryForCompanyList() {
return this.queryForList("" , false);
public List<CompanyDto> queryForCompanyList() {
return this.queryForList("", false);
}
@Override
public void modifyCompanyInfo(Company companyList)throws Exception {
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService;
import com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto;
import org.springframework.beans.factory.annotation.Autowired;
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.stream.Collectors;
/**
* 设备信息表服务实现类
......@@ -16,18 +22,44 @@ import java.util.List;
* @date 2022-09-22
*/
@Service
public class EquipmentServiceImpl extends BaseService<EquipmentDto,Equipment,EquipmentMapper> implements IEquipmentService {
public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, EquipmentMapper> implements IEquipmentService {
@Autowired
EquipmentMapper equipmentMapper;
/**
* 分页查询
*/
public Page<EquipmentDto> queryForEquipmentPage(Page<EquipmentDto> page) {
public Page<EquipmentDto> queryForEquipmentPage(Page<EquipmentDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<EquipmentDto> queryForEquipmentList() {
return this.queryForList("" , false);
public List<EquipmentDto> queryForEquipmentList() {
return this.queryForList("", false);
}
/**
* 设备数据名称查询
*
* @return
*/
public List<JSONObject> selectName(String installationUnitId) {
List<JSONObject> names = new ArrayList<>();
//添加查询条件
QueryWrapper<Equipment> wrapper = new QueryWrapper<>();
wrapper.eq("company_id", installationUnitId);
List<Equipment> equipment = equipmentMapper.selectList(wrapper);
for (Equipment i : equipment) {
JSONObject name = new JSONObject();
name.put("name", i.getName());
name.put("SequenceNbr", i.getSequenceNbr());
names.add(name);
}
return names;
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeService;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.sql.Wrapper;
import java.util.List;
/**
......@@ -16,7 +23,10 @@ import java.util.List;
* @date 2022-09-22
*/
@Service
public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,InstallNotice,InstallNoticeMapper> implements IInstallNoticeService {
public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,InstallNotice,InstallNoticeMapper> implements IInstallNoticeService{
@Autowired
InstallNoticeMapper installNoticeMapper;
/**
* 分页查询
*/
......@@ -30,4 +40,44 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
public List<InstallNoticeDto> queryForInstallNoticeList() {
return this.queryForList("" , false);
}
/**
* 安装告知申请分页查询
*/
public Page<InstallNoticePageDto> installNoticePage(Page<InstallNoticePageDto> page) {
return installNoticeMapper.installNoticePage(page);
}
/**
* 安装告知申请列表查询
*/
@Override
public List<InstallNoticePageDto> installNoticeList() {
return installNoticeMapper.installNoticeList();
}
/**
* 安装告知申请列表按name,unit筛选
*/
@Override
public List<InstallNoticePageDto> selectByName(String name, String unit) {
return installNoticeMapper.selectByName(name,unit);
}
/**
*通过sequenceNbr查列表数据
*/
@Override
public InstallNoticePageDto selectById(Long sequenceNbr) {
return installNoticeMapper.selectById(sequenceNbr);
}
/**
* 根据sequenceNbr查询告知申请详情
* @param sequenceNbr
* @return
*/
public InstallNoticeDto selectOneById(Long sequenceNbr){
return installNoticeMapper.selectoneById(sequenceNbr);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.ugp.api.dto.PercentOfPassDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.QualityInfo;
import com.yeejoin.amos.boot.module.ugp.api.entity.Weld;
import com.yeejoin.amos.boot.module.ugp.api.mapper.IInstallationQualityMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IInstallationQualityService;
import jdk.nashorn.internal.runtime.logging.Logger;
import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author cpp
* @Description
* @Date 2022/10/10
*/
@Service
public class InstallationQualityImpl extends BaseService<PercentOfPassDto, QualityInfo, IInstallationQualityMapper> implements IInstallationQualityService {
@Resource
private IInstallationQualityMapper mapper;
@Resource
private WeldServiceImpl weldService;
@Resource
private OrgUsrServiceImpl orgUsrService;
//分页查询项目质量监检信息
@Override
public Page<PercentOfPassDto> find(Page<PercentOfPassDto> page,PercentOfPassDto pd) {
String name = pd.getName( );
List<QualityInfo> qfList = mapper.findss ( );
List<PercentOfPassDto> list = new ArrayList<> ( );
for (QualityInfo qualityInfo : qfList) {
PercentOfPassDto percentOfPassDto = new PercentOfPassDto ( );
percentOfPassDto.setName (qualityInfo.getProject ( ).getName ( ));
percentOfPassDto.setAddress (qualityInfo.getProject ( ).getAddress ( ));
percentOfPassDto.setProgressStatus (qualityInfo.getProject ( ).getProgressStatus ( ));
percentOfPassDto.setProjectId (qualityInfo.getProjectId ( ));
percentOfPassDto.setChargePerson (qualityInfo.getProject ( ).getChargePerson ( ));
//获取监理单位的id
Long supervisoryUnitId = qualityInfo.getSupervisoryUnitId ( );
//调用接口
try {
OrgUsrFormDto orgUsrFormDto = orgUsrService.selectCompanyById (supervisoryUnitId);
String currentUnit = orgUsrFormDto.getCurrentUnit ( );
percentOfPassDto.setCurrentUnit (currentUnit);
} catch (Exception e) {
e.printStackTrace ( );
}
percentOfPassDto.setStartDate (qualityInfo.getProject ( ).getStartDate ( ));
percentOfPassDto.setConstructionUnit (qualityInfo.getProject ( ).getConstructionUnit ( ));
percentOfPassDto.setSubmitDate (qualityInfo.getProject ( ).getSubmitDate ( ));
list.add (percentOfPassDto);
}
//创建新的集合来存放数据
List<PercentOfPassDto> newsData = new ArrayList<> ( );
if (list != null && list.size ( ) > 0) {
//遍历数据
for (PercentOfPassDto pr : list) {
//获取项目id
Long projectId = pr.getProjectId ( );
//通过项目id查询焊口数据
List<WeldDto> weldDtoList = weldService.getProjectId (projectId);
if (weldDtoList != null && weldDtoList.size ( ) > 0) {
//获取焊口信息总条数
int sum = weldDtoList.size ( );
//焊口合格数
int qualifiedData = 0;
for (WeldDto weldDto : weldDtoList) {
String superInspecStatus = weldDto.getSuperInspecStatus ( );
if (superInspecStatus.equals ("合格")) {
qualifiedData++;
}
}
//合格率
BigDecimal sums = new BigDecimal (sum);
BigDecimal qualifiedDatas = new BigDecimal (qualifiedData);
Double pass = qualifiedDatas.divide (sums, 2, BigDecimal.ROUND_HALF_UP).multiply (new BigDecimal (100)).doubleValue ( );
//转换成百分比,生成合格率
String fpy = pass.toString ( ) + "%";
//将合格率赋值给数据集合
pr.setPercentOfPass (fpy);
//将数据添加到新集合里面
newsData.add (pr);
}
}
//name不为空走条件筛选
if (!StringUtils.isEmpty(name)) {
//进行数据筛选
List<PercentOfPassDto> collect = newsData.stream ( ).filter (b -> b.getName ( ).equals (name)).collect (Collectors.toList ( ));
page.setRecords (collect);
page.setTotal (collect.size ());
return page;
}else {
//如果条件name为空的,直接查询全部
page.setRecords (newsData);
page.setTotal (newsData.size ());
return page;
}
}
return null;
}
}
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import com.yeejoin.amos.boot.module.ugp.api.entity.Material;
import com.yeejoin.amos.boot.module.ugp.api.mapper.MaterialMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IMaterialService;
import com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto;
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.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -16,18 +21,40 @@ import java.util.List;
* @date 2022-09-22
*/
@Service
public class MaterialServiceImpl extends BaseService<MaterialDto,Material,MaterialMapper> implements IMaterialService {
public class MaterialServiceImpl extends BaseService<MaterialDto, Material, MaterialMapper> implements IMaterialService {
/**
* 分页查询
*/
public Page<MaterialDto> queryForMaterialPage(Page<MaterialDto> page) {
public Page<MaterialDto> queryForMaterialPage(Page<MaterialDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<MaterialDto> queryForMaterialList() {
return this.queryForList("" , false);
public List<MaterialDto> queryForMaterialList() {
return this.queryForList("", false);
}
/**
* 获取材料名称跟企业id
*/
public List<JSONObject> selectName(String installationUnitId) {
List<JSONObject> names = new ArrayList<>();
//添加查询条件
QueryWrapper<Material> wrapper = new QueryWrapper<>();
wrapper.eq("company_id", installationUnitId);
List<Material> materials = baseMapper.selectList(wrapper);
for (Material i : materials) {
JSONObject name = new JSONObject();
name.put("name", i.getName());
name.put("SequenceNbr", i.getSequenceNbr());
names.add(name);
}
return names;
}
}
\ No newline at end of file
......@@ -3,6 +3,10 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum;
import com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource;
import com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper;
import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper;
......@@ -13,14 +17,20 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.beans.factory.annotation.Autowired;
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.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
import java.util.Map;
import static com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum.*;
/**
* 项目资源表(包括焊工、管材、设备)服务实现类
......@@ -40,15 +50,15 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
/**
* 分页查询
*/
public Page<ProjectResourceDto> queryForProjectResourcePage(Page<ProjectResourceDto> page) {
public Page<ProjectResourceDto> queryForProjectResourcePage(Page<ProjectResourceDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<ProjectResourceDto> queryForProjectResourceList() {
return this.queryForList("" , false);
public List<ProjectResourceDto> queryForProjectResourceList() {
return this.queryForList("", false);
}
@Override
......@@ -107,4 +117,37 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
this.projectResourceMapper.deleteById(item.getSequenceNbr());
});
}
/**
* 存储项目设备关系
*/
public ProjectResource saveIds(JSONObject jsonObject) {
JSONArray subForm = jsonObject.getJSONArray("subForm");
ProjectResource projectResource = new ProjectResource();
for (Object json2 : subForm) {
String select = JSON.parseObject(JSON.toJSONString(json2)).getString("select");
// if (!jsonObject.getString("sequenceNbr").isEmpty()){
// jsonObject.getString("sequenceNbr");
// }
String SequenceNbr = jsonObject.getString("SequenceNbr");
String type = jsonObject.getString("type");
if (type.equals(设备资源.getStatus())) {
projectResource.setType(设备资源.getState());
}
if (type.equals(焊工资源.getStatus())) {
projectResource.setType(焊工资源.getState());
}
if (type.equals(管材资源.getStatus())) {
projectResource.setType(管材资源.getState());
}
projectResource.setProjectId(Long.valueOf(SequenceNbr));
projectResource.setResourceId(Long.valueOf(select));
this.save(projectResource);
}
return projectResource;
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IProjectService;
import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -16,18 +20,38 @@ import java.util.List;
* @date 2022-09-22
*/
@Service
public class ProjectServiceImpl extends BaseService<ProjectDto,Project,ProjectMapper> implements IProjectService {
public class ProjectServiceImpl extends BaseService<ProjectDto, Project, ProjectMapper> implements IProjectService {
@Autowired
ProjectMapper projectMapper;
/**
* 分页查询
*/
public Page<ProjectDto> queryForProjectPage(Page<ProjectDto> page) {
public Page<ProjectDto> queryForProjectPage(Page<ProjectDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<ProjectDto> queryForProjectList() {
return this.queryForList("" , false);
public List<ProjectDto> queryForProjectList() {
return this.queryForList("", false);
}
/**
* 查询项目名称
*/
public List<JSONObject> selectName() {
List<JSONObject> names = new ArrayList<>();
//查询所有项目
List<Project> projects = projectMapper.selectList(null);
for (Project i : projects) {
JSONObject name = new JSONObject();
name.put("name", i.getName());
name.put("sequenceNbr", i.getSequenceNbr());
names.add(name);
}
return names;
}
}
\ No newline at end of file
......@@ -13,7 +13,7 @@ import java.util.List;
* 质量问题表服务实现类
*
* @author system_generator
* @date 2022-09-22
* @date 2022-09-29
*/
@Service
public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,QualityProblem,QualityProblemMapper> implements IQualityProblemService {
......
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.Enum.WeldCodeEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.WeldMethodEnum;
import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.api.entity.Weld;
import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper;
import com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IWeldService;
import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
* 焊口信息表服务实现类
......@@ -16,18 +27,113 @@ import java.util.List;
* @date 2022-09-22
*/
@Service
public class WeldServiceImpl extends BaseService<WeldDto,Weld,WeldMapper> implements IWeldService {
public
class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements IWeldService {
@Autowired
WeldMapper weldMapper;
@Autowired
ProjectMapper projectMapper;
// Logger logger = LoggerFactory.getLogger(WeldServiceImpl.class);
/**
* 分页查询
*/
public Page<WeldDto> queryForWeldPage(Page<WeldDto> page) {
return this.queryForPage(page, null, false);
public Page<WeldDto> queryForWeldPage(int current, int size, String projectId) {
Page<WeldDto> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
Page<WeldDto> weldDtoPage = this.queryForPage(page, null, false);
for (WeldDto weldDto : weldDtoPage.getRecords()) {
QueryWrapper<Project> wrapper = new QueryWrapper<>();
wrapper.eq("sequence_nbr", weldDto.getProjectId());
Project project = projectMapper.selectOne(wrapper);
weldDto.setName(project.getName());
QueryWrapper<Project> wrapperUnit = new QueryWrapper<>();
wrapperUnit.eq("installation_unit_id", weldDto.getInstallCompany());
List<Project> projects = projectMapper.selectList(wrapperUnit);
for (Project project1 : projects) {
weldDto.setInstallationUnit(project1.getInstallationUnit());
weldDto.setCodingStatus(WeldCodeEnum.map.get(weldDto.getCodingStatus()));
weldDto.setCodingMethod(WeldMethodEnum.map.get(weldDto.getCodingMethod()));
}
}
//如果不为空则过滤
if (projectId != null) {
List<WeldDto> L = weldDtoPage.getRecords().stream().filter(b -> b.getProjectId().equals(projectId)).collect(Collectors.toList());
weldDtoPage.setRecords(L);
}
return weldDtoPage;
}
/**
* 列表查询 示例
*/
public List<WeldDto> queryForWeldList() {
return this.queryForList("" , false);
public List<WeldDto> queryForWeldList() {
return this.queryForList("", false);
}
/**
* 生成焊口编号保存并查询
*/
// 静态变量存储最大值
private static final AtomicInteger atomicNum = new AtomicInteger();
// 初始化编号
private final int INIT_CODE_NUM = 0;
private final String FIRST_CHARACTER = "-HK";
public synchronized List<Weld> getCode(Long sequenceNbr, int number) {
List<Weld> welds = new ArrayList<>();
Project project = projectMapper.selectById(sequenceNbr);
QueryWrapper<Weld> wrapper = new QueryWrapper<>();
//根据seq查询条件判断是否已经存在该项目的该焊口编码
wrapper.eq("project_id", sequenceNbr).orderByDesc("code").last("limit 1");
Weld weld1 = weldMapper.selectOne(wrapper);
if (weld1 != null) {
//存在时取后四位
String substring = weld1.getCode().substring(weld1.getCode().length() - 4, weld1.getCode().length());
atomicNum.set(Integer.parseInt(substring));
} else {
//不存在时将atomicNum初始化
atomicNum.set(INIT_CODE_NUM);
}
for (int i = 0; i < number; i++) {
Weld weld = new Weld();
//生成四位数
String i1 = String.format("%04d", atomicNum.incrementAndGet());
//生成编码
String code = (project.getCode()) + FIRST_CHARACTER + i1;
weld.setRegion(project.getAddress());
weld.setProjectId(Long.valueOf(project.getSequenceNbr()));
weld.setInstallCompany(project.getInstallationUnitId());
weld.setCode(code);
weld.setRegion(project.getAddress());
weld.setCodingMethod(WeldMethodEnum.赋码方式1.getState());
weld.setCodingStatus(WeldCodeEnum.赋值状态2.getState());
weld.setCodingDate(new Date());
welds.add(weld);
}
saveBatch(welds);
return welds;
}
/**
* 通过项目多个id获取数据
* @param projectId
* @return
*/
public List<WeldDto> getProjectId(Long projectId){
return weldMapper.select(projectId);
}
}
\ No newline at end of file
......@@ -4,19 +4,32 @@ spring.datasource.url=jdbc:mysql://39.98.45.134:3306/tzs_amos_ugp_biz?allowMulti
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.maximum-pool-size=15
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.idle-timeout=30000
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=1800000
spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.connection-test-query=SELECT 1
##eureka properties:
eureka.client.registry-fetch-interval-seconds=5
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.lease-renewal-interval-in-seconds=5
eureka.client.service-url.defaultZone =http://39.98.45.134:10001/eureka/
eureka.instance.health-check-url=http://172.16.3.89:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.89:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.89:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://39.98.45.134:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://39.98.45.134:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://39.98.45.134:${server.port}${server.servlet.context-path}/swagger-ui.html
#redis properties:
spring.redis.database=1
#spring.redis.host=39.98.45.134
spring.redis.host=39.98.45.134
spring.redis.port=6379
spring.redis.password=yeejoin@2020
......
......@@ -7,40 +7,18 @@ spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
logging.config=classpath:logback-${spring.profiles.active}.xml
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
redis.cache.failure.time=10800
##liquibase
spring.liquibase.change-log = classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled= true
## DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle=10
spring.datasource.hikari.maximum-pool-size=25
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.idle-timeout=30000
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=120000
spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.connection-test-query=SELECT 1
## eureka properties:
eureka.client.registry-fetch-interval-seconds=5
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url-path=/actuator/health
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.lease-renewal-interval-in-seconds=5
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## redis properties:
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
redis.cache.failure.time=10800
## emqx properties:
emqx.clean-session=true
......@@ -51,4 +29,7 @@ emqx.password=123456
fire-rescue=123
params.work.flow.processDefinitionKey=xiangmulixiangliucheng
amos.secret.key=ugp
#logging.level.com.yeejoin.amos=error
\ No newline at end of file
......@@ -19,6 +19,11 @@
<artifactId>amos-boot-biz-common</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-feign-workflow</artifactId>
<version>1.7.9-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
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