Commit 4a98b776 authored by 李腾威's avatar 李腾威

BUG 2193

parent 11b0cc2d
package com.yeejoin.amos.boot.module.common.api.dto; package com.yeejoin.amos.boot.module.common.api.dto;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* 消防员合同 * 消防员合同
* *
...@@ -62,4 +61,7 @@ public class FirefightersContractDto extends BaseDto { ...@@ -62,4 +61,7 @@ public class FirefightersContractDto extends BaseDto {
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")
private Map<String, List<AttachmentDto>> attachments; private Map<String, List<AttachmentDto>> attachments;
@ApiModelProperty(value = "合同类型字典code")
private String contractTypeCode;
} }
...@@ -164,7 +164,7 @@ public class FirefightersContractController extends BaseController { ...@@ -164,7 +164,7 @@ public class FirefightersContractController extends BaseController {
} else if (type.equals(String.class)) { } else if (type.equals(String.class)) {
String fileValue = (String) field.get(firefightersContract); String fileValue = (String) field.get(firefightersContract);
/* BUG 2193 合同名称模糊匹配 start*/ /* BUG 2193 合同名称模糊匹配 start*/
if ("name".equals(name)) { if ("NAME".equals(name)) {
firefightersContractQueryWrapper.like(name, fileValue); firefightersContractQueryWrapper.like(name, fileValue);
} else { } else {
firefightersContractQueryWrapper.eq(name, fileValue); firefightersContractQueryWrapper.eq(name, fileValue);
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.baomidou.mybatisplus.core.toolkit.Sequence; import com.baomidou.mybatisplus.core.toolkit.Sequence;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersContractDto; import com.yeejoin.amos.boot.module.common.api.dto.FirefightersContractDto;
import com.yeejoin.amos.boot.module.common.api.entity.FirefightersContract; import com.yeejoin.amos.boot.module.common.api.entity.FirefightersContract;
...@@ -21,6 +11,17 @@ import com.yeejoin.amos.boot.module.common.api.entity.SourceFile; ...@@ -21,6 +11,17 @@ import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import com.yeejoin.amos.boot.module.common.api.mapper.FirefightersContractMapper; import com.yeejoin.amos.boot.module.common.api.mapper.FirefightersContractMapper;
import com.yeejoin.amos.boot.module.common.api.service.IFirefightersContractService; import com.yeejoin.amos.boot.module.common.api.service.IFirefightersContractService;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* 消防员合同 服务实现类 * 消防员合同 服务实现类
...@@ -36,12 +37,22 @@ public class FirefightersContractServiceImpl extends BaseService<FirefightersCon ...@@ -36,12 +37,22 @@ public class FirefightersContractServiceImpl extends BaseService<FirefightersCon
SourceFileServiceImpl sourceFileService; SourceFileServiceImpl sourceFileService;
@Autowired @Autowired
private Sequence sequence; private Sequence sequence;
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public FirefightersContractDto save(FirefightersContractDto firefightersContract) { public FirefightersContractDto save(FirefightersContractDto firefightersContract) {
long sequenceId = sequence.nextId(); long sequenceId = sequence.nextId();
FirefightersContract detail=new FirefightersContract(); FirefightersContract detail=new FirefightersContract();
/* BUG 2193 LITW start*/
DataDictionary dataDictionary = iDataDictionaryService.getById(firefightersContract.getContractTypeCode());
if(null !=dataDictionary ) {
detail.setContractType(dataDictionary.getName());
}
/* BUG 2193 LITW end*/
Bean.copyExistPropertis(firefightersContract, detail); Bean.copyExistPropertis(firefightersContract, detail);
firefightersContract.setSequenceNbr(sequenceId); firefightersContract.setSequenceNbr(sequenceId);
detail.setSequenceNbr(sequenceId); detail.setSequenceNbr(sequenceId);
......
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