Commit 9d93a81e authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.6.4' into MVP1.6.4

parents 48c14662 5051288a
......@@ -75,5 +75,13 @@ public class FailReasonConfig extends BaseEntity {
@ExcelProperty("状态")
@Schema(description = "状态")
private String status;
/**
* 更新人
*/
@ExcelAttribute(name = "更新人")
@ExcelProperty("更新人")
@Schema(description = "更新人")
private String updateName;
}
\ No newline at end of file
......@@ -18,9 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -58,7 +56,7 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Length(max = 6, message = "月份不能超过6个字符")
@ExcelProperty("月份")
@Schema(description = "月份")
private String month;
private Integer month;
/**
* 省
*/
......@@ -75,6 +73,7 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Length(max = 10, message = "市不能超过10个字符")
@ExcelProperty("市")
@Schema(description = "市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String city;
/**
* 县
......@@ -83,6 +82,7 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Length(max = 10, message = "县不能超过10个字符")
@ExcelProperty("县")
@Schema(description = "县")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String town;
/**
* 社保截止日
......
......@@ -65,16 +65,16 @@ public class TSocialfundHouseRes {
/**
* 社保户
*/
@ExcelAttribute(name = "社保户", maxLength = 32)
@Length(max = 32, message = "社保户不能超过32个字符")
@ExcelAttribute(name = "社保户", maxLength = 50)
@Length(max = 50, message = "社保户不能超过50个字符")
@ExcelProperty("社保户")
@Schema(description = "社保户")
private String socialHousehold;
/**
* 公积金户
*/
@ExcelAttribute(name = "公积金户", maxLength = 32)
@Length(max = 32, message = "公积金户不能超过32个字符")
@ExcelAttribute(name = "公积金户", maxLength = 50)
@Length(max = 50, message = "公积金户不能超过50个字符")
@ExcelProperty("公积金户")
@Schema(description = "公积金户")
private String fundHousehold;
......
......@@ -55,4 +55,17 @@ private int limitStart;
@Schema(description = "查询limit 数据条数")
private int limitEnd;
/**
* @Author fxj
* 月份起时间
**/
@Schema(description = "查询month 开始")
private int monthStart;
/**
* @Author fxj
* 月份止时间
**/
@Schema(description = "查询month 数据条数")
private int monthEnd;
}
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
import com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.Optional;
/**
* 失败原因配置
*
......@@ -58,6 +64,16 @@ public class FailReasonConfigController {
@SysLog("新增失败原因配置" )
@PostMapping
public R<Boolean> save(@RequestBody FailReasonConfig failReasonConfig) {
FailReasonConfig failReasonCount = failReasonConfigService.getOne(Wrappers.<FailReasonConfig>query().lambda()
.eq(FailReasonConfig::getReasonKey,failReasonConfig.getReasonKey())
.last(CommonConstants.LAST_ONE_SQL));
if(Optional.ofNullable(failReasonCount).isPresent()) {
return R.failed("已存在对应的关键字的失败原因配置!");
}
YifuUser user = SecurityUtils.getUser();
if (Common.isNotNull(user)) {
failReasonConfig.setUpdateName(user.getNickname());
}
return R.ok(failReasonConfigService.save(failReasonConfig));
}
......@@ -70,6 +86,10 @@ public class FailReasonConfigController {
@SysLog("修改失败原因配置" )
@PutMapping
public R<Boolean> updateById(@RequestBody FailReasonConfig failReasonConfig) {
YifuUser user = SecurityUtils.getUser();
if (Common.isNotNull(user)) {
failReasonConfig.setUpdateName(user.getNickname());
}
return R.ok(failReasonConfigService.updateById(failReasonConfig));
}
......
......@@ -129,6 +129,13 @@ public class TSocialDeadlineInfoController {
@SysLog("修改社保医疗截止日配置")
@PutMapping
public R<Boolean> updateById(@RequestBody TSocialDeadlineInfo tSocialDeadlineInfo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.UPDATE_DATA_FAIL);
}
tSocialDeadlineInfo.setUpdateName(user.getNickname());
tSocialDeadlineInfo.setUpdateBy(user.getId());
tSocialDeadlineInfo.setUpdateTime(LocalDateTime.now());
return tSocialDeadlineInfoService.updateByIdAsso(tSocialDeadlineInfo);
}
......@@ -154,8 +161,8 @@ public class TSocialDeadlineInfoController {
*/
@Operation(summary = "通过id启用0/禁用1社保医疗截止日配置", description = "通过id启用0/禁用1社保医疗截止日配置")
@SysLog("通过id启用/禁用社保医疗截止日配置")
@PutMapping("/{id}")
public R<Boolean> updateStatusById(@PathVariable String id,@RequestParam String status) {
@PutMapping("/updateStatusById")
public R<Boolean> updateStatusById(@RequestParam String id,@RequestParam String status) {
YifuUser user = SecurityUtils.getUser();
if (!Common.isNotNull(user)){
return R.failed(CommonConstants.USER_FAIL);
......
......@@ -13,6 +13,7 @@
<result property="createName" column="CREATE_NAME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateName" column="UPDATE_NAME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -25,7 +26,8 @@
a.CREATE_NAME,
a.CREATE_BY,
a.UPDATE_TIME,
a.UPDATE_BY
a.UPDATE_BY,
a.UPDATE_NAME
</sql>
<sql id="failReasonConfig_where">
<if test="failReasonConfig != null">
......
......@@ -58,51 +58,57 @@
</sql>
<sql id="tSocialDeadlineInfo_where">
<if test="tSocialDeadlineInfo != null">
<if test="tSocialDeadlineInfo.id != null and tSocialDeadlineInfo.id.trim() != ''">
AND a.ID = #{tSocialDeadlineInfo.id}
</if>
<if test="tSocialDeadlineInfo.month != null and tSocialDeadlineInfo.month.trim() != ''">
AND a.MONTH = #{tSocialDeadlineInfo.month}
</if>
<if test="tSocialDeadlineInfo.province != null and tSocialDeadlineInfo.province.trim() != ''">
AND a.PROVINCE = #{tSocialDeadlineInfo.province}
</if>
<if test="tSocialDeadlineInfo.city != null and tSocialDeadlineInfo.city.trim() != ''">
AND a.CITY = #{tSocialDeadlineInfo.city}
</if>
<if test="tSocialDeadlineInfo.town != null and tSocialDeadlineInfo.town.trim() != ''">
AND a.TOWN = #{tSocialDeadlineInfo.town}
</if>
<if test="tSocialDeadlineInfo.socialEndDate != null">
AND a.SOCIAL_END_DATE = #{tSocialDeadlineInfo.socialEndDate}
</if>
<if test="tSocialDeadlineInfo.medicalEndDate != null">
AND a.MEDICAL_END_DATE = #{tSocialDeadlineInfo.medicalEndDate}
</if>
<if test="tSocialDeadlineInfo.createBy != null and tSocialDeadlineInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tSocialDeadlineInfo.createBy}
</if>
<if test="tSocialDeadlineInfo.createName != null and tSocialDeadlineInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tSocialDeadlineInfo.createName}
</if>
<if test="tSocialDeadlineInfo.createTime != null">
AND a.CREATE_TIME = #{tSocialDeadlineInfo.createTime}
</if>
<if test="tSocialDeadlineInfo.updateBy != null and tSocialDeadlineInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tSocialDeadlineInfo.updateBy}
</if>
<if test="tSocialDeadlineInfo.updateName != null and tSocialDeadlineInfo.updateName.trim() != ''">
AND a.UPDATE_NAME = #{tSocialDeadlineInfo.updateName}
</if>
<if test="tSocialDeadlineInfo.updateTime != null">
AND a.UPDATE_TIME = #{tSocialDeadlineInfo.updateTime}
</if>
<if test="tSocialDeadlineInfo.status != null and tSocialDeadlineInfo.status.trim() != ''">
AND a.STATUS = #{tSocialDeadlineInfo.status}
</if>
<if test="tSocialDeadlineInfo.type != null and tSocialDeadlineInfo.type.trim() != ''">
AND a.TYPE = #{tSocialDeadlineInfo.type}
</if>
<if test="tSocialDeadlineInfo.id != null and tSocialDeadlineInfo.id.trim() != ''">
AND a.ID = #{tSocialDeadlineInfo.id}
</if>
<if test="tSocialDeadlineInfo.month != null and tSocialDeadlineInfo.month.trim() != ''">
AND a.MONTH = #{tSocialDeadlineInfo.month}
</if>
<if test="tSocialDeadlineInfo.province != null and tSocialDeadlineInfo.province.trim() != ''">
AND a.PROVINCE = #{tSocialDeadlineInfo.province}
</if>
<if test="tSocialDeadlineInfo.city != null and tSocialDeadlineInfo.city.trim() != ''">
AND a.CITY = #{tSocialDeadlineInfo.city}
</if>
<if test="tSocialDeadlineInfo.town != null and tSocialDeadlineInfo.town.trim() != ''">
AND a.TOWN = #{tSocialDeadlineInfo.town}
</if>
<if test="tSocialDeadlineInfo.socialEndDate != null">
AND a.SOCIAL_END_DATE = #{tSocialDeadlineInfo.socialEndDate}
</if>
<if test="tSocialDeadlineInfo.medicalEndDate != null">
AND a.MEDICAL_END_DATE = #{tSocialDeadlineInfo.medicalEndDate}
</if>
<if test="tSocialDeadlineInfo.createBy != null and tSocialDeadlineInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tSocialDeadlineInfo.createBy}
</if>
<if test="tSocialDeadlineInfo.createName != null and tSocialDeadlineInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tSocialDeadlineInfo.createName}
</if>
<if test="tSocialDeadlineInfo.createTime != null">
AND a.CREATE_TIME = #{tSocialDeadlineInfo.createTime}
</if>
<if test="tSocialDeadlineInfo.updateBy != null and tSocialDeadlineInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tSocialDeadlineInfo.updateBy}
</if>
<if test="tSocialDeadlineInfo.updateName != null and tSocialDeadlineInfo.updateName.trim() != ''">
AND a.UPDATE_NAME = #{tSocialDeadlineInfo.updateName}
</if>
<if test="tSocialDeadlineInfo.updateTime != null">
AND a.UPDATE_TIME = #{tSocialDeadlineInfo.updateTime}
</if>
<if test="tSocialDeadlineInfo.status != null and tSocialDeadlineInfo.status.trim() != ''">
AND a.STATUS = #{tSocialDeadlineInfo.status}
</if>
<if test="tSocialDeadlineInfo.monthEnd != 0">
AND a.MONTH <![CDATA[<=]]> #{tSocialDeadlineInfo.monthEnd}
</if>
<if test="tSocialDeadlineInfo.monthStart != 0">
AND a.MONTH <![CDATA[>=]]> #{tSocialDeadlineInfo.monthStart}
</if>
<if test="tSocialDeadlineInfo.type != null and tSocialDeadlineInfo.type.trim() != ''">
AND a.TYPE = #{tSocialDeadlineInfo.type}
</if>
</if>
</sql>
<!--tSocialDeadlineInfo简单分页查询-->
......
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