Commit 82550849 authored by tangwei's avatar tangwei

修改bug

parent 53dfb1f3
......@@ -21,7 +21,7 @@ public class ExStationBasicDto {
@ExcelProperty(value = "场站编号", index = 1)
@ApiModelProperty(value = "场站编号")
private String stationCode;
@ExplicitConstraint(indexNum = 2, source = {"建设方","总承包方","分包方"}) //固定下拉内容
@ExplicitConstraint(indexNum = 2, sourceClass = CommonExplicitConstraint.class, method = "getstationType") //固定下拉内容
@ExcelProperty(value = "场站类型", index = 2)
@ApiModelProperty(value = "场站类型")
private String stationType;
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jxiop.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.module.jxiop.api.entity.CommonFile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -80,6 +81,7 @@ public class PersonBasicDto extends BaseDto {
private List<CommonFile> backCertificatePhoto;
@ApiModelProperty(value = "进入本单位工作时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date stationWorkTime;
@ApiModelProperty(value = "工作所在地key")
......
......@@ -77,6 +77,18 @@ public class PersonUser {
@TableField(typeHandler = FastjsonTypeHandler.class)
private List<CommonFile> backCertificatePhoto;
@ApiModelProperty(value = "进入本单位工作时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date stationWorkTime;
@ApiModelProperty(value = "工作所在地key")
private String workPlaceKey;
@ApiModelProperty(value = "岗位")
private String postName;
/**
* 技能学历
* */
......
......@@ -33,6 +33,9 @@ public class StationBasicDto extends BaseDto {
@ApiModelProperty(value = "场站类型")
private String stationType;
@ApiModelProperty(value = "场站类型名称")
private String stationTypeName;
@ApiModelProperty(value = "项目状态")
private String stationFlag;
......
......@@ -39,17 +39,19 @@ public class UserMapperDto {
}
public void setHeadPhoto(String headPhoto) {
this.headPhoto = headPhoto;
this.photo= headPhoto!=null? JSON.parseArray(headPhoto,CommonFile.class):null;
this.photo= headPhoto!=null? JSON.parseArray(headPhoto,CommonFile.class):null;
if(!this.photo.isEmpty()){
this.headPhoto = this.photo.get(0).getUrl();
}
}
public List<CommonFile> getPhoto() {
return headPhoto!=null? JSON.parseArray(headPhoto,CommonFile.class):null;
return photo;
}
public void setPhoto(List<CommonFile> photo) {
this.photo =headPhoto!=null? JSON.parseArray(headPhoto,CommonFile.class):null;
this.photo =photo;
}
}
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -133,6 +134,7 @@ public class PersonBasic extends BaseEntity {
* 进入本单位工作时间
*/
@TableField("station_work_time")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date stationWorkTime;
/**
......
......@@ -34,7 +34,7 @@ public class PersonSkillEducation extends BaseEntity {
* 是否特殊工种
*/
@TableField("is_special_work")
private Integer isSpecialWork;
private String isSpecialWork;
/**
* 工种名称
......
......@@ -43,6 +43,9 @@ public class StationBasic extends BaseEntity {
*/
@TableField("station_type")
private String stationType;
@TableField("station_type_name")
private String stationTypeName;
/**
* 项目状态
*/
......
......@@ -11,6 +11,7 @@
station_basic.station_master_name stationMasterName ,
station_basic.mobile_phone mobilePhone ,
station_basic.station_type stationType ,
station_basic.station_type_name stationTypeName ,
station_basic.address address ,
station_basic.owner_unit ownerUnit
from station_basic
......@@ -72,7 +73,7 @@
select
station_basic.station_name stationName ,
station_basic.station_code stationCode,
station_basic.station_type stationType,
station_basic.station_type_name stationType,
station_basic.station_flag stationFlag,
station_basic.address address,
station_basic.station_master_name stationMasterName ,
......
......@@ -72,6 +72,10 @@ public class StationBasicController extends BaseController {
public ResponseModel<StationBasicDto> updateBySequenceNbrStationBasic(@RequestBody StationBasic model,@RequestParam(value = "sequenceNbr") Long sequenceNbr) {
try {
model.setSequenceNbr(sequenceNbr);
stationBasicServiceImpl.update(model);
return ResponseHelper.buildResponse(null);
}catch (InnerInvokException e){
......
......@@ -35,7 +35,7 @@ public class ExDataSourcesImpl implements DataSources {
@Autowired
private RedisUtils redisUtils;
private final String CZLX="CZLX";
@Override
public String[] selectList(String type, String method) throws Exception {
String[] str = {};
......@@ -46,6 +46,10 @@ public class ExDataSourcesImpl implements DataSources {
case "getArea":
str = getArea();
break;
case "getstationType":
str = getstationType(CZLX);
break;
}
}
return str;
......@@ -111,17 +115,43 @@ public class ExDataSourcesImpl implements DataSources {
if (!data.isEmpty()) {
for (ListCompanyModel datum : data) {
datas.add(datum.getCompanyName() + "@" + datum.getSequenceNbr());
// if (datum.getChildren() != null) {
// this.getCompanyModel(datum.getChildren(),datas);
// }
}
}
return datas;
}
private String[] getstationType(String dictCode) {
FeignClientResult<List<DictionarieValueModel>> Model =Systemctl.dictionarieClient.dictValues(dictCode);
List<DictionarieValueModel> user=new ArrayList<>();
if (!ObjectUtils.isEmpty(Model)) {
if(Model.getStatus()==200){
user = Model.getResult();
}else{
throw new RuntimeException(Model.getMessage());
}
}
String[] str = null;
List<String> collect=new ArrayList<>();
this.getstationTypeList(user,collect);
str = collect.toArray(new String[collect.size()]);
return str;
}
public List<String> getstationTypeList( List<DictionarieValueModel> data,List<String> datas) {
if (!data.isEmpty()) {
for (DictionarieValueModel datum : data) {
datas.add(datum.getDictDataValue() + "@" + datum.getDictDataKey());
}
}
return datas;
}
private String[] getDataDictionary(String type) {
......
......@@ -132,6 +132,13 @@ public class ExcelServiceImpl {
CompanyModel companyModel=personBasicServiceImpl.getCompanyModel(Long.parseLong(type[1]));
fireChemical.setAreaCode(companyModel.getCompanyCode());
}
if (fireChemical.getStationType() != null) {
String[] type = fireChemical.getStationType().split("@");
fireChemical.setStationTypeName(type[0]);
fireChemical.setStationType(type[1]);
}
//平台增加场站
CompanyModel companyModeldata=new CompanyModel();
......@@ -141,6 +148,7 @@ public class ExcelServiceImpl {
companyModeldata.setParentId(Long.valueOf(fireChemical.getArea()));
companyModeldata.setCompanyCode(fireChemical.getStationCode());
companyModeldata= this.addCompanyModel(companyModeldata);
fireChemical.setProjectOrgCode(companyModeldata.getOrgCode());
fireChemical.setPlatformStationId(companyModeldata.getSequenceNbr().toString());
excelEntityList.add(fireChemical);
......
......@@ -207,7 +207,13 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto,PersonBas
PersonSkillEducation personSkillEducation = new PersonSkillEducation();
BeanUtils.copyProperties(personUser, personSkillEducation);
personSkillEducation.setPersonId(personBasic.getSequenceNbr());
PersonSkillEducation personSkillEducationd= personSkillEducationService.getOne(new QueryWrapper<PersonSkillEducation>().eq("person_id", personBasic.getSequenceNbr()));
personSkillEducation.setSequenceNbr(personSkillEducationd.getSequenceNbr());
personSkillEducationService.updateById(personSkillEducation);
//人员资质信息
personCertificateService.updateById(personCertificate);
//人员账号信息
......
......@@ -15,6 +15,8 @@ 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.DictionarieModel;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
......@@ -25,7 +27,7 @@ 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 com.yeejoin.amos.feign.systemctl.Systemctl;
import java.util.ArrayList;
import java.util.List;
......@@ -46,6 +48,8 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station
PersonBasicServiceImpl personBasicServiceImpl;
@Autowired
StationBasicMapper stationBasicMapper;
private final String CZLX="CZLX";
/**
* 分页查询
*/
......@@ -111,6 +115,10 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station
stationBasic.setAreaCode(companyModel.getCompanyCode());
stationBasic.setProjectOrgCode(companyModeldata.getOrgCode());
stationBasic.setPlatformStationId(companyModeldata.getSequenceNbr().toString());
//获取类型名称
String typeName=this.queryByCode(CZLX,stationBasic.getStationType());
stationBasic.setStationTypeName(typeName);
//场站基本信息
this.save(stationBasic);
if(CollectionUtils.isEmpty(list)){
......@@ -155,7 +163,19 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station
}
private String queryByCode(String dictCode,String dictDataKey) {
FeignClientResult<DictionarieValueModel> Model =Systemctl.dictionarieClient.value(dictCode,dictDataKey);
DictionarieValueModel user=new DictionarieValueModel();
if (!ObjectUtils.isEmpty(Model)) {
if(Model.getStatus()==200){
user = Model.getResult();
}else{
throw new RuntimeException(Model.getMessage());
}
}
return user.getDictDataValue();
}
......@@ -202,6 +222,11 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto,Station
stationBasic.setAreaCode(companyModel.getCompanyCode());
stationBasic.setProjectOrgCode(companyModeldata.getOrgCode());
stationBasic.setPlatformStationId(companyModeldata.getSequenceNbr().toString());
//获取类型名称
String typeName=this.queryByCode(CZLX,stationBasic.getStationType());
stationBasic.setStationTypeName(typeName);
//场站基本信息
stationBasicMapper.updateById(stationBasic);
......
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