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