Commit 7bb32b6a authored by fangxinjiang's avatar fangxinjiang

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

parents 59192535 1f90fa71
...@@ -29,7 +29,6 @@ import org.hibernate.validator.constraints.Length; ...@@ -29,7 +29,6 @@ import org.hibernate.validator.constraints.Length;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -119,7 +118,7 @@ public class FddContractAttachInfo extends BaseEntity { ...@@ -119,7 +118,7 @@ public class FddContractAttachInfo extends BaseEntity {
*/ */
@Schema(description ="工作地点") @Schema(description ="工作地点")
@Length(max=200,message = "工作地点不能超过200个字符") @Length(max=200,message = "工作地点不能超过200个字符")
@ExcelAttribute(name = "工作地点" , maxLength = 200 ) @ExcelAttribute(name = "工作地点",isNotEmpty = true, errorInfo = "工作地点不能为空", maxLength = 200 )
private String workSpace; private String workSpace;
/** /**
...@@ -164,8 +163,8 @@ public class FddContractAttachInfo extends BaseEntity { ...@@ -164,8 +163,8 @@ public class FddContractAttachInfo extends BaseEntity {
/** /**
* 身份证号码 * 身份证号码
*/ */
@Schema(description ="身份证号") @Schema(description ="身份证号")
@ExcelAttribute(name = "身份证号码", isNotEmpty = true, errorInfo = "身份证号码不能为空", maxLength = 32, needExport = true) @ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号不能为空", maxLength = 32, needExport = true)
private String empIdcard; private String empIdcard;
/** /**
...@@ -177,8 +176,16 @@ public class FddContractAttachInfo extends BaseEntity { ...@@ -177,8 +176,16 @@ public class FddContractAttachInfo extends BaseEntity {
/** /**
* 结算主体编码 * 结算主体编码
*/ */
@Schema(description ="结算主体编码") @Schema(description ="项目编码")
private String departNo; @ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码不能为空", maxLength = 20, needExport = true)
private String departNo;
/**
* 员工类型
*/
@Schema(description ="员工类型")
@ExcelAttribute(name = "员工类型", isDataId = true, errorInfo = "员工类型不能为空", maxLength = 20)
private String empNatrue;
/** /**
* 结算主体名称 * 结算主体名称
......
...@@ -210,14 +210,14 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -210,14 +210,14 @@ public class TEmployeeContractInfo extends BaseEntity {
* 合同岗位 * 合同岗位
*/ */
@Length(max = 32, message = "合同岗位不能超过32个字符") @Length(max = 32, message = "合同岗位不能超过32个字符")
@ExcelAttribute(name = "合同岗位", maxLength = 32, needExport = true) @ExcelAttribute(name = "合同岗位", isNotEmpty = true, errorInfo = "合同岗位不能为空", maxLength = 32, needExport = true)
@Schema(description = "合同岗位", name = "post") @Schema(description = "合同岗位", name = "post")
private String post; private String post;
/** /**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制 * 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/ */
@Length(max = 32, message = "工时制不能超过32个字符") @Length(max = 32, message = "工时制不能超过32个字符")
@ExcelAttribute(name = "工时制", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.WORKING_HOURS) @ExcelAttribute(name = "工时制", isNotEmpty = true, errorInfo = "工时制不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.WORKING_HOURS)
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours") @Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
private String workingHours; private String workingHours;
/** /**
...@@ -411,7 +411,9 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -411,7 +411,9 @@ public class TEmployeeContractInfo extends BaseEntity {
/** /**
* 合同甲方 * 合同甲方
*/ */
@ExcelAttribute(name = "合同甲方") @NotBlank(message = "合同甲方不能为空")
@Length(max = 50, message = "合同甲方不能超过50个字符")
@ExcelAttribute(name = "合同甲方", isNotEmpty = true, errorInfo = "合同甲方不能为空", maxLength = 50, needExport = true)
@Schema(description = "合同甲方") @Schema(description = "合同甲方")
@Size(max = 50, message = "合同甲方不可超过50位") @Size(max = 50, message = "合同甲方不可超过50位")
private String contractParty; private String contractParty;
......
...@@ -67,6 +67,11 @@ ...@@ -67,6 +67,11 @@
<version>1.8.0</version> <version>1.8.0</version>
<artifactId>fadada-java-sdk-api3</artifactId> <artifactId>fadada-java-sdk-api3</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.6</version>
</dependency>
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<version>5.8.0</version> <version>5.8.0</version>
......
...@@ -34,6 +34,12 @@ public class EmployeeConstants { ...@@ -34,6 +34,12 @@ public class EmployeeConstants {
public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!"; public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!";
public static final String SITUATION_SIX = "作废"; public static final String SITUATION_SIX = "作废";
public static final String SITUATION_SEVEN = "终止"; public static final String SITUATION_SEVEN = "终止";
public static final String EMPID_NOT_EMPTY = "员工ID、项目ID不可为空;";
public static final String OTHERS = "其他";
public static final String SUB_MUST = "业务细分必填";
public static final String CONTRACT_END_MUST = "合同到期时间必填";
public static final String CONTRACT_TYPE_TWO = "2";
public static final String CONTRACT_NO_IN_USE = "暂无可操作的合同";
/** /**
* 无数据可更新 * 无数据可更新
......
...@@ -17,12 +17,10 @@ ...@@ -17,12 +17,10 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller; package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fadada.api.exception.ApiException; import com.fadada.api.exception.ApiException;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractTemplate; import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractTemplate;
import com.yifu.cloud.plus.v1.yifu.archives.service.FddContractTemplateService; import com.yifu.cloud.plus.v1.yifu.archives.service.FddContractTemplateService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -36,7 +34,6 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -36,7 +34,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.IOException; import java.io.IOException;
import java.time.LocalDateTime;
/** /**
...@@ -87,7 +84,7 @@ public class FddContractTemplateController { ...@@ -87,7 +84,7 @@ public class FddContractTemplateController {
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('demo_fddcontracttemplate_edit')" ) @PreAuthorize("@pms.hasPermission('demo_fddcontracttemplate_edit')" )
public R updateById(@RequestBody FddContractTemplate fddContractTemplate) { public R updateById(@RequestBody FddContractTemplate fddContractTemplate) {
return R.ok(fddContractTemplateService.changeInfo(fddContractTemplate)); return fddContractTemplateService.changeInfo(fddContractTemplate);
} }
/** /**
......
...@@ -42,6 +42,7 @@ import lombok.RequiredArgsConstructor; ...@@ -42,6 +42,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.support.SimpleValueWrapper; import org.springframework.cache.support.SimpleValueWrapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -51,10 +52,13 @@ import javax.servlet.ServletOutputStream; ...@@ -51,10 +52,13 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 员工合同 * 员工合同
...@@ -68,7 +72,6 @@ import java.util.List; ...@@ -68,7 +72,6 @@ import java.util.List;
public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContractInfoMapper, TEmployeeContractInfo> implements TEmployeeContractInfoService { public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContractInfoMapper, TEmployeeContractInfo> implements TEmployeeContractInfoService {
private static final String ID_NOT_EMPTY = "ID,EMP_ID不可为空"; private static final String ID_NOT_EMPTY = "ID,EMP_ID不可为空";
private static final String EMPID_NOT_EMPTY = "员工ID、项目ID不可为空";
private static final String EMPINFO_IS_NOT_EXITS_BYID = "未找到人员档案与项目档案!"; private static final String EMPINFO_IS_NOT_EXITS_BYID = "未找到人员档案与项目档案!";
...@@ -113,7 +116,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -113,7 +116,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
public R<List<ErrorMessage>> saveNewContract(TEmployeeContractInfo tEmployeeContractInfo) { public R<List<ErrorMessage>> saveNewContract(TEmployeeContractInfo tEmployeeContractInfo) {
try { try {
if (Common.isEmpty(tEmployeeContractInfo.getEmpId()) || Common.isEmpty(tEmployeeContractInfo.getSettleDomain())) { if (Common.isEmpty(tEmployeeContractInfo.getEmpId()) || Common.isEmpty(tEmployeeContractInfo.getSettleDomain())) {
return R.failed(EMPID_NOT_EMPTY); return R.failed(EmployeeConstants.EMPID_NOT_EMPTY);
} }
return this.setBaseInfo(tEmployeeContractInfo); return this.setBaseInfo(tEmployeeContractInfo);
} catch (Exception e) { } catch (Exception e) {
...@@ -154,7 +157,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -154,7 +157,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
if (this.saveContractAndAtta(tEmployeeContractInfo)) { if (this.saveContractAndAtta(tEmployeeContractInfo)) {
return R.ok(); return R.ok(null,"保存成功");
} else { } else {
return R.failed(); return R.failed();
} }
...@@ -200,6 +203,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -200,6 +203,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
private void initEmployeeContract(TEmployeeContractInfo tEmployeeContractInfo, TEmployeeInfo tEmployeeInfo private void initEmployeeContract(TEmployeeContractInfo tEmployeeContractInfo, TEmployeeInfo tEmployeeInfo
, TEmployeeProject tEmployeeProject, YifuUser user) { , TEmployeeProject tEmployeeProject, YifuUser user) {
tEmployeeContractInfo.setEmpId(tEmployeeInfo.getId()); tEmployeeContractInfo.setEmpId(tEmployeeInfo.getId());
tEmployeeContractInfo.setEmpNatrue(tEmployeeInfo.getEmpNatrue());
tEmployeeContractInfo.setEmpIdcard(tEmployeeInfo.getEmpIdcard()); tEmployeeContractInfo.setEmpIdcard(tEmployeeInfo.getEmpIdcard());
tEmployeeContractInfo.setEmpName(tEmployeeInfo.getEmpName()); tEmployeeContractInfo.setEmpName(tEmployeeInfo.getEmpName());
tEmployeeContractInfo.setEmpNo(tEmployeeInfo.getEmpCode()); tEmployeeContractInfo.setEmpNo(tEmployeeInfo.getEmpCode());
...@@ -684,10 +688,16 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -684,10 +688,16 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
@Transactional @Transactional
public void importContract(List<EmployeeContractVO> excelVOList, List<ErrorMessage> errorMessageList) { public void importContract(List<EmployeeContractVO> excelVOList, List<ErrorMessage> errorMessageList) {
/// 个性化校验逻辑 /// 个性化校验逻辑
ErrorMessage errorMsg; Map<Integer, Integer> errorMsgMap = new HashMap<>();
if (Common.isNotNull(errorMessageList)) {
errorMessageList.forEach(errorMessage -> errorMsgMap.put(errorMessage.getLineNum(), CommonConstants.ONE_INT));
}
EmployeeContractVO excel; EmployeeContractVO excel;
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
if (errorMsgMap.get(i+2) != null) {
continue;
}
excel = excelVOList.get(i); excel = excelVOList.get(i);
// 存储 // 存储
this.insertExcel(excel, errorMessageList); this.insertExcel(excel, errorMessageList);
...@@ -702,22 +712,52 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -702,22 +712,52 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
BeanUtil.copyProperties(excel, insert); BeanUtil.copyProperties(excel, insert);
try { try {
if (Common.isEmpty(insert.getEmpIdcard()) || Common.isEmpty(insert.getDeptNo())) { StringBuilder errorInfo = new StringBuilder();
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EMPID_NOT_EMPTY)); if (EmployeeConstants.OTHERS.equals(insert.getContractName()) && Common.isEmpty(insert.getContractSubName())) {
errorInfo.append(EmployeeConstants.SUB_MUST);
}
if (!EmployeeConstants.CONTRACT_TYPE_TWO.equals(insert.getContractType())
&& Common.isEmpty(insert.getContractEnd())) {
errorInfo.append(EmployeeConstants.CONTRACT_END_MUST);
} }
TEmployeeProject project = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() if (Common.isEmpty(insert.getEmpIdcard()) || Common.isEmpty(insert.getDeptNo())) {
.eq(TEmployeeProject::getEmpIdcard, insert.getEmpIdcard()) errorInfo.append(EmployeeConstants.EMPID_NOT_EMPTY);
.eq(TEmployeeProject::getDeptNo, insert.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT).last(CommonConstants.LAST_ONE_SQL));
if (project == null) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EMPINFO_IS_NOT_EXITS_BYID));
} else { } else {
insert.setEmpId(project.getEmpId()); TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
insert.setSettleDomain(project.getDeptId()); .eq(TEmployeeContractInfo::getEmpIdcard, insert.getEmpIdcard())
// 核心保存 .eq(TEmployeeContractInfo::getDeptNo, insert.getDeptNo())
R<List<ErrorMessage>> info = this.setBaseInfo(insert); .eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getMsg())); .eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING).last(CommonConstants.LAST_ONE_SQL));
if (contractInfo == null) {
errorInfo.append(EmployeeConstants.CONTRACT_NO_IN_USE);
}
}
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorInfo.toString()));
if (Common.isEmpty(errorInfo.toString())) {
TEmployeeProject project = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, insert.getEmpIdcard())
.eq(TEmployeeProject::getDeptNo, insert.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT).last(CommonConstants.LAST_ONE_SQL));
if (project == null) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EMPINFO_IS_NOT_EXITS_BYID));
} else {
insert.setEmpId(project.getEmpId());
insert.setSettleDomain(project.getDeptId());
// 批量直接待审核
insert.setAuditStatus(CommonConstants.ONE_INT);
if (Common.isEmpty(insert.getContractTerm())
&& Common.isNotNull(insert.getContractStart())
&& Common.isNotNull(insert.getContractEnd())) {
int monthDiff = DateUtil.getMonthDiff(insert.getContractStart(), insert.getContractEnd());
BigDecimal b = new BigDecimal(String.valueOf(monthDiff/12.0));
b = b.setScale(1, BigDecimal.ROUND_HALF_UP);
insert.setContractTerm(String.valueOf(b));
}
// 核心保存
R<List<ErrorMessage>> info = this.setBaseInfo(insert);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getMsg()));
}
} }
} catch (Exception e) { } catch (Exception e) {
log.error("员工合同保存异常:" + e.getMessage()); log.error("员工合同保存异常:" + e.getMessage());
......
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
1=1 1=1
<include refid="fddContractTemplate_where"/> <include refid="fddContractTemplate_where"/>
</where> </where>
order by a.CREATE_TIME desc
</select> </select>
<update id="updateTeFddTemplateNull"> <update id="updateTeFddTemplateNull">
......
...@@ -858,6 +858,24 @@ public class DateUtil { ...@@ -858,6 +858,24 @@ public class DateUtil {
return false; return false;
} }
/**
* @param startDate
* @param endDate
* @Description: 计算年月的月份差值(202205-202205=0)想要1自己+1
* @Author: hgw
* @Date: 2022/7/15 12:16
* @return: int
**/
public static int getMonthDiff(Date startDate, Date endDate) {
try {
SimpleDateFormat sdf = new SimpleDateFormat(DATETIME_YYYYMM);
return Integer.parseInt(sdf.format(endDate)) - Integer.parseInt(sdf.format(startDate));
} catch (IllegalFormatException e) {
log.error("计算日期月份差,方法名:getMonthDiff,出错:",e);
return 0;
}
}
public static int getMonthCountByDate(Date startDate, Date endDate) { public static int getMonthCountByDate(Date startDate, Date endDate) {
// type:1.当月缴当月的 2.当月缴次月的 // type:1.当月缴当月的 2.当月缴次月的
int monthC = 0; int monthC = 0;
......
...@@ -65,30 +65,6 @@ public class SysHouseHoldInfo extends BaseEntity { ...@@ -65,30 +65,6 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("户名") @ExcelProperty("户名")
private String name; private String name;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间" )
@Schema(description ="创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
/**
* 创建人ID
*/
@ExcelAttribute(name = "创建人ID" )
@Schema(description ="创建人ID")
@ExcelProperty("创建人ID")
private String createUser;
/**
* 创建人姓名
*/
@ExcelAttribute(name = "创建人姓名" )
@Schema(description ="创建人姓名")
@ExcelProperty("创建人姓名")
private String createUserName;
/** /**
* 0启用1禁用 * 0启用1禁用
*/ */
...@@ -145,37 +121,4 @@ public class SysHouseHoldInfo extends BaseEntity { ...@@ -145,37 +121,4 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("所属机构名称") @ExcelProperty("所属机构名称")
private String organName; private String organName;
/**
* 创建者
*/
@ExcelAttribute(name = "创建者" )
@Schema(description ="创建者")
@ExcelProperty("创建者")
private String createBy;
/**
* 更新人
*/
@ExcelAttribute(name = "更新人" )
@Schema(description ="更新人")
@ExcelProperty("更新人")
private String updateBy;
/**
* 创建人姓名
*/
@ExcelAttribute(name = "创建人姓名" )
@Schema(description ="创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间" )
@Schema(description ="更新时间")
@ExcelProperty("更新时间")
private LocalDateTime updateTime;
} }
...@@ -26,8 +26,6 @@ import io.swagger.v3.oas.annotations.media.Schema; ...@@ -26,8 +26,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/** /**
* 预估临时政策配置表 * 预估临时政策配置表
* *
...@@ -129,22 +127,6 @@ public class TAgentConfig extends BaseEntity { ...@@ -129,22 +127,6 @@ public class TAgentConfig extends BaseEntity {
@ExcelProperty("适用年") @ExcelProperty("适用年")
private String year; private String year;
/**
* createTime
*/
@ExcelAttribute(name = "createTime" )
@Schema(description ="createTime")
@ExcelProperty("createTime")
private LocalDateTime createTime;
/**
* createUser
*/
@ExcelAttribute(name = "createUser" )
@Schema(description ="createUser")
@ExcelProperty("createUser")
private String createUser;
/** /**
* 生效起月份 包含 * 生效起月份 包含
*/ */
......
...@@ -68,7 +68,6 @@ public class TAgentConfigController { ...@@ -68,7 +68,6 @@ public class TAgentConfigController {
*/ */
@Operation(summary = "不分页查询", description = "不分页查询") @Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" ) @PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tagentconfig_get')" )
public R<List<TAgentConfig>> getTAgentConfigNoPage(@RequestBody TAgentConfig tAgentConfig) { public R<List<TAgentConfig>> getTAgentConfigNoPage(@RequestBody TAgentConfig tAgentConfig) {
return R.ok(tAgentConfigService.list(Wrappers.query(tAgentConfig))); return R.ok(tAgentConfigService.list(Wrappers.query(tAgentConfig)));
} }
...@@ -78,7 +77,7 @@ public class TAgentConfigController { ...@@ -78,7 +77,7 @@ public class TAgentConfigController {
* @param id id * @param id id
* @return R * @return R
*/ */
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_tagentconfig_get')") @Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
public R<TAgentConfig> getById(@PathVariable("id" ) String id) { public R<TAgentConfig> getById(@PathVariable("id" ) String id) {
return R.ok(tAgentConfigService.getById(id)); return R.ok(tAgentConfigService.getById(id));
...@@ -89,7 +88,7 @@ public class TAgentConfigController { ...@@ -89,7 +88,7 @@ public class TAgentConfigController {
* @param tAgentConfig 预估临时政策配置表 * @param tAgentConfig 预估临时政策配置表
* @return R * @return R
*/ */
@Operation(summary = "新增预估临时政策配置表", description = "新增预估临时政策配置表:hasPermission('demo_tagentconfig_add')") @Operation(summary = "新增预估临时政策配置表", description = "新增预估临时政策配置表:hasPermission('social_tagentconfig_add')")
@SysLog("新增预估临时政策配置表" ) @SysLog("新增预估临时政策配置表" )
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('social_tagentconfig_add')" ) @PreAuthorize("@pms.hasPermission('social_tagentconfig_add')" )
...@@ -102,7 +101,7 @@ public class TAgentConfigController { ...@@ -102,7 +101,7 @@ public class TAgentConfigController {
* @param tAgentConfig 预估临时政策配置表 * @param tAgentConfig 预估临时政策配置表
* @return R * @return R
*/ */
@Operation(summary = "修改预估临时政策配置表", description = "修改预估临时政策配置表:hasPermission('demo_tagentconfig_edit')") @Operation(summary = "修改预估临时政策配置表", description = "修改预估临时政策配置表:hasPermission('social_tagentconfig_edit')")
@SysLog("修改预估临时政策配置表" ) @SysLog("修改预估临时政策配置表" )
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('social_tagentconfig_edit')" ) @PreAuthorize("@pms.hasPermission('social_tagentconfig_edit')" )
...@@ -115,7 +114,7 @@ public class TAgentConfigController { ...@@ -115,7 +114,7 @@ public class TAgentConfigController {
* @param id id * @param id id
* @return R * @return R
*/ */
@Operation(summary = "通过id删除预估临时政策配置表", description = "通过id删除预估临时政策配置表:hasPermission('demo_tagentconfig_del')") @Operation(summary = "通过id删除预估临时政策配置表", description = "通过id删除预估临时政策配置表:hasPermission('social_tagentconfig_del')")
@SysLog("通过id删除预估临时政策配置表" ) @SysLog("通过id删除预估临时政策配置表" )
@DeleteMapping("/{id}" ) @DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_tagentconfig_del')" ) @PreAuthorize("@pms.hasPermission('social_tagentconfig_del')" )
...@@ -128,9 +127,9 @@ public class TAgentConfigController { ...@@ -128,9 +127,9 @@ public class TAgentConfigController {
* @param id * @param id
* @return R * @return R
*/ */
@Operation(summary = "通过id删除预估临时政策配置表", description = "通过id删除预估临时政策配置表:hasPermission('demo_tagentconfig_del')") @Operation(summary = "通过id删除预估临时政策配置表", description = "通过id删除预估临时政策配置表:hasPermission('social_tagentconfig_del')")
@PostMapping("/updateOpenFlagById") @PostMapping("/updateOpenFlagById")
@PreAuthorize("@pms.hasPermission('social:tagentconfig_edit')") @PreAuthorize("@pms.hasPermission('social_tagentconfig_edit')")
public R updateOpenFlagById(@RequestParam String id) { public R updateOpenFlagById(@RequestParam String id) {
return tAgentConfigService.updateFlagById(id); return tAgentConfigService.updateFlagById(id);
} }
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
<result property="organId" column="ORGAN_ID"/> <result property="organId" column="ORGAN_ID"/>
<result property="name" column="NAME"/> <result property="name" column="NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="createUser" column="CREATE_USER"/>
<result property="createUserName" column="CREATE_USER_NAME"/>
<result property="delFlag" column="DEL_FLAG"/> <result property="delFlag" column="DEL_FLAG"/>
<result property="type" column="TYPE"/> <result property="type" column="TYPE"/>
<result property="province" column="PROVINCE"/> <result property="province" column="PROVINCE"/>
...@@ -40,6 +38,7 @@ ...@@ -40,6 +38,7 @@
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -47,8 +46,6 @@ ...@@ -47,8 +46,6 @@
a.ORGAN_ID, a.ORGAN_ID,
a.NAME, a.NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.CREATE_USER,
a.CREATE_USER_NAME,
a.DEL_FLAG, a.DEL_FLAG,
a.TYPE, a.TYPE,
a.PROVINCE, a.PROVINCE,
...@@ -75,12 +72,6 @@ ...@@ -75,12 +72,6 @@
<if test="sysHouseHoldInfo.createTime != null"> <if test="sysHouseHoldInfo.createTime != null">
AND a.CREATE_TIME = #{sysHouseHoldInfo.createTime} AND a.CREATE_TIME = #{sysHouseHoldInfo.createTime}
</if> </if>
<if test="sysHouseHoldInfo.createUser != null and sysHouseHoldInfo.createUser.trim() != ''">
AND a.CREATE_USER = #{sysHouseHoldInfo.createUser}
</if>
<if test="sysHouseHoldInfo.createUserName != null and sysHouseHoldInfo.createUserName.trim() != ''">
AND a.CREATE_USER_NAME = #{sysHouseHoldInfo.createUserName}
</if>
<if test="sysHouseHoldInfo.delFlag != null and sysHouseHoldInfo.delFlag.trim() != ''"> <if test="sysHouseHoldInfo.delFlag != null and sysHouseHoldInfo.delFlag.trim() != ''">
AND a.DEL_FLAG = #{sysHouseHoldInfo.delFlag} AND a.DEL_FLAG = #{sysHouseHoldInfo.delFlag}
</if> </if>
......
...@@ -35,8 +35,11 @@ ...@@ -35,8 +35,11 @@
<result property="pension" column="PENSION"/> <result property="pension" column="PENSION"/>
<result property="unemployed" column="UNEMPLOYED"/> <result property="unemployed" column="UNEMPLOYED"/>
<result property="year" column="YEAR"/> <result property="year" column="YEAR"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="createUser" column="CREATE_USER"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="startMonth" column="START_MONTH"/> <result property="startMonth" column="START_MONTH"/>
<result property="endMonth" column="END_MONTH"/> <result property="endMonth" column="END_MONTH"/>
</resultMap> </resultMap>
...@@ -52,10 +55,13 @@ ...@@ -52,10 +55,13 @@
a.PENSION, a.PENSION,
a.UNEMPLOYED, a.UNEMPLOYED,
a.YEAR, a.YEAR,
a.CREATE_TIME,
a.CREATE_USER,
a.START_MONTH, a.START_MONTH,
a.END_MONTH a.END_MONTH,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME
</sql> </sql>
<sql id="tAgentConfig_where"> <sql id="tAgentConfig_where">
<if test="tAgentConfig != null"> <if test="tAgentConfig != null">
...@@ -92,18 +98,27 @@ ...@@ -92,18 +98,27 @@
<if test="tAgentConfig.year != null and tAgentConfig.year.trim() != ''"> <if test="tAgentConfig.year != null and tAgentConfig.year.trim() != ''">
AND a.YEAR = #{tAgentConfig.year} AND a.YEAR = #{tAgentConfig.year}
</if> </if>
<if test="tAgentConfig.createTime != null">
AND a.CREATE_TIME = #{tAgentConfig.createTime}
</if>
<if test="tAgentConfig.createUser != null and tAgentConfig.createUser.trim() != ''">
AND a.CREATE_USER = #{tAgentConfig.createUser}
</if>
<if test="tAgentConfig.startMonth != null and tAgentConfig.startMonth.trim() != ''"> <if test="tAgentConfig.startMonth != null and tAgentConfig.startMonth.trim() != ''">
AND a.START_MONTH = #{tAgentConfig.startMonth} AND a.START_MONTH = #{tAgentConfig.startMonth}
</if> </if>
<if test="tAgentConfig.endMonth != null and tAgentConfig.endMonth.trim() != ''"> <if test="tAgentConfig.endMonth != null and tAgentConfig.endMonth.trim() != ''">
AND a.END_MONTH = #{tAgentConfig.endMonth} AND a.END_MONTH = #{tAgentConfig.endMonth}
</if> </if>
<if test="tAgentConfig.createBy != null and tAgentConfig.createBy.trim() != ''">
AND a.CREATE_BY = #{tAgentConfig.createBy}
</if>
<if test="tAgentConfig.updateBy != null and tAgentConfig.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tAgentConfig.updateBy}
</if>
<if test="tAgentConfig.createName != null and tAgentConfig.createName.trim() != ''">
AND a.CREATE_NAME = #{tAgentConfig.createName}
</if>
<if test="tAgentConfig.createTime != null">
AND a.CREATE_TIME = #{tAgentConfig.createTime}
</if>
<if test="tAgentConfig.updateTime != null">
AND a.UPDATE_TIME = #{tAgentConfig.updateTime}
</if>
</if> </if>
</sql> </sql>
<!--tAgentConfig简单分页查询--> <!--tAgentConfig简单分页查询-->
......
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