Commit 6d1e122b authored by fangxinjiang's avatar fangxinjiang

薪資配置

parent 0ecdbe6d
......@@ -2153,9 +2153,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isEmpty(mobile)){
return true;
}
return !(baseMapper.selectCount(Wrappers.<TEmployeeInfo>query().lambda()
return baseMapper.selectCount(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getFileStatus,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)) > 0);
.eq(TEmployeeInfo::getEmpPhone,mobile)
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)) > 0;
}
private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap,
......
......@@ -126,6 +126,9 @@ public class ExcelAttributeConstants {
public static final String DEPARTID_PROVINCE_CITY_TOWN = "departId_province_city_town";
//派减离职原因
public static final String REDUCE_PROJECT_REASON = "reduce_project_reason";
//派减离职原因
public static final String REDUCE_SOCIAL_REASON = "social_reduce_reason";
//社保缴纳月份
public static final String SOCIAL_PAY_MONTH = "socialPayMonth";
......
......@@ -448,6 +448,10 @@ public interface ErrorCodes {
* 派增异常: 社保各项起缴日不一致,委托备注必填
*/
String EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR = "emp.dispatch.social.date.limit.error";
/**
* 派增异常: 社保各项起缴日不一致,委托备注必填
*/
String EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR2 = "emp.dispatch.social.date.limit.error2";
/**
* 派增异常: 社保各项起缴月份需为可补缴月份,请确认后操作
*/
......
......@@ -342,6 +342,18 @@ public class Common {
}
return obj.toString();
}
public static String isNullToString(String obj) {
if(obj == null || "".equals(obj)) {
return CommonConstants.EMPTY_STRING;
}
if(obj.trim().length() == 0) {
return CommonConstants.EMPTY_STRING;
}
if(obj.trim().equals("null")) {
return CommonConstants.EMPTY_STRING;
}
return obj;
}
/**
* 两个日期中间年份
......
......@@ -163,10 +163,12 @@ emp.dispatch.social.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u6D3
emp.dispatch.fund.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u516C\u79EF\u91D1\u6D3E\u5355\u57FA\u6570\u4E0D\u53EF\u5C0F\u4E8E\u6700\u4F4E\u57FA\u6570\u4E14\u4E0D\u53EF\u5927\u4E8E\u6700\u9AD8\u57FA\u6570
emp.dispatch.social.base.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u5404\u9879\u57FA\u6570\u4E0D\u4E00\u81F4\uFF0C\u59D4\u6258\u5907\u6CE8\u5FC5\u586B
emp.dispatch.social.base.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5907\u6848\u57FA\u6570\u4E0E\u793E\u4FDD\u4EFB\u610F\u57FA\u6570\u4E0D\u4E00\u81F4\uFF0C\u59D4\u6258\u5907\u6CE8\u5FC5\u586B
emp.dispatch.social.date.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u5404\u9879\u8D77\u7F34\u65E5\u4E0D\u4E00\u81F4\uFF0C\u59D4\u6258\u5907\u6CE8\u5FC5\u586B
emp.dispatch.social.date.limit.error2=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5408\u540C\u8D77\u59CB\u65E5\u671F\u4E0E\u793E\u4FDD\u4EFB\u610F\u8D77\u7F34\u65E5\u671F\u4E0D\u4E00\u81F4\uFF0C\u59D4\u6258\u5907\u6CE8\u5FC5\u586B
emp.dispatch.social.start.is.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u5404\u9879\u8D77\u7F34\u6708\u4EFD\u9700\u4E3A\u53EF\u8865\u7F34\u6708\u4EFD\uFF0C\u8BF7\u786E\u8BA4\u540E\u64CD\u4F5C\uFF01
emp.dispatch.fund.start.is.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u516C\u79EF\u91D1\u8D77\u7F34\u6708\u4EFD\u9700\u4E3A\u53EF\u8865\u7F34\u6708\u4EFD\uFF0C\u8BF7\u786E\u8BA4\u540E\u64CD\u4F5C\uFF01
......
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -25,7 +26,7 @@ import java.time.LocalDateTime;
@EqualsAndHashCode(callSuper = true)
@TableName("t_salary_config_standard")
@Tag(name = "薪资识别配置(标准模板)")
public class TSalaryConfigStandard extends Model<TSalaryConfigStandard> implements Serializable {
public class TSalaryConfigStandard extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
......@@ -80,23 +81,6 @@ public class TSalaryConfigStandard extends Model<TSalaryConfigStandard> implemen
@ExcelAttribute(name = "是否进行计算扣税", isNotEmpty = true, errorInfo = "是否进行计算扣税不能为空")
private Integer isTax;
/**
* 创建人
*/
@ExcelProperty(value = "创建人")
@Length(max = 32, message = "创建人不能超过32个字符")
@NotBlank(message = "创建人不能为空")
@ExcelAttribute(name = "创建人", isNotEmpty = true, errorInfo = "创建人不能为空", maxLength = 32)
private String createUser;
/**
* 创建时间
*/
@ExcelProperty(value = "创建时间")
@NotBlank(message = "创建时间不能为空")
@ExcelAttribute(name = "创建时间", isNotEmpty = true, errorInfo = "创建时间不能为空")
private LocalDateTime createTime;
/**
* 排序项
*/
......
......@@ -27,7 +27,7 @@ public class TSalaryStandardExportVo implements Serializable {
*/
@ExcelAttribute(name = "状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)")
@NotBlank(message = "状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空")
@ExcelProperty("状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)")
@ExcelProperty("状态)")
private Integer status;
/**
* 推送月份(YYYYMM)
......
......@@ -30,7 +30,7 @@ import java.time.LocalDateTime;
* @date 2022-08-05 11:40:14
*/
@Data
public class TSalaryStandardSearchVo extends TSalaryStandard implements Serializable {
public class TSalaryStandardSearchVo extends TSalaryStandard{
/**
* 多选导出或删除等操作
......
......@@ -110,7 +110,7 @@ public class TSalaryConfigStandardController {
* @param tSalaryConfigStandard
* @return R
*/
@Operation(description = "新增")
@Operation(description = "新增 wxhr:tsalaryconfigstandard_add")
@SysLog("新增薪资识别配置(标准模板)")
@PostMapping
@PreAuthorize("@pms.hasPermission('wxhr:tsalaryconfigstandard_add')")
......@@ -121,7 +121,7 @@ public class TSalaryConfigStandardController {
}
// 填充个人代扣等java字段
this.setJavaFiedName(tSalaryConfigStandard);
tSalaryConfigStandard.setCreateUser(String.valueOf(user.getId()));
tSalaryConfigStandard.setCreateBy(String.valueOf(user.getId()));
tSalaryConfigStandard.setCreateTime(LocalDateTime.now());
tSalaryConfigStandard.setIsMustNeed(CommonConstants.ZERO_STRING);
tSalaryConfigStandard.setModelType(CommonConstants.ONE_STRING);
......@@ -135,7 +135,7 @@ public class TSalaryConfigStandardController {
* @param tSalaryConfigStandard
* @return R
*/
@Operation(description = "修改")
@Operation(description = "修改 wxhr:tsalaryconfigstandard_edit")
@SysLog("修改薪资识别配置(标准模板)")
@PutMapping
@PreAuthorize("@pms.hasPermission('wxhr:tsalaryconfigstandard_edit')")
......@@ -146,7 +146,7 @@ public class TSalaryConfigStandardController {
}
// 填充个人代扣等java字段
this.setJavaFiedName(tSalaryConfigStandard);
if (String.valueOf(user.getId()).equals(tSalaryConfigStandard.getCreateUser())) {
if (String.valueOf(user.getId()).equals(tSalaryConfigStandard.getCreateBy())) {
return new R<>(tSalaryConfigStandardService.updateById(tSalaryConfigStandard));
} else {
return R.failed("不可修改非自己创建的!");
......@@ -176,7 +176,7 @@ public class TSalaryConfigStandardController {
* @param id
* @return R
*/
@Operation(description = "删除")
@Operation(description = "删除 wxhr:tsalaryconfigstandard_del")
@SysLog("删除薪资识别配置(标准模板)")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('wxhr:tsalaryconfigstandard_del')")
......@@ -186,7 +186,7 @@ public class TSalaryConfigStandardController {
return R.failed(NO_USER);
}
TSalaryConfigStandard sc = tSalaryConfigStandardService.getById(id);
if (String.valueOf(user.getId()).equals(sc.getCreateUser())) {
if (String.valueOf(user.getId()).equals(sc.getCreateBy())) {
return new R<>(tSalaryConfigStandardService.removeById(id));
} else {
return R.failed("不可删除非自己创建的!");
......
......@@ -52,5 +52,5 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
List<TSalaryStandardExportVo> getSalaryStandardExport(@Param("searchVo") TSalaryStandardSearchVo searchVo);
int getSalaryStandardExportCount(TSalaryStandardSearchVo searchVo);
int getSalaryStandardExportCount(@Param("searchVo")TSalaryStandardSearchVo searchVo);
}
......@@ -93,7 +93,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryStandardExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
......@@ -153,7 +152,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
public R<List<ErrorMessage>> importDiy(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TSalaryStandardVo> util1 = new ExcelUtil<>(TSalaryStandardVo.class);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
......
......@@ -12,7 +12,7 @@
<result property="modelType" column="MODEL_TYPE"/>
<result property="isMustNeed" column="IS_MUST_NEED"/>
<result property="isTax" column="IS_TAX"/>
<result property="createUser" column="CREATE_USER"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="orderLine" column="order_line"/>
</resultMap>
......@@ -37,8 +37,8 @@
<if test="tSalaryConfigStandard.isMustNeed != null and tSalaryConfigStandard.isMustNeed.trim() != ''">
AND IS_MUST_NEED = #{tSalaryConfigStandard.isMustNeed}
</if>
<if test="tSalaryConfigStandard.createUser != null and tSalaryConfigStandard.createUser.trim() != ''">
AND CREATE_USER = #{tSalaryConfigStandard.createUser}
<if test="tSalaryConfigStandard.createBy != null and tSalaryConfigStandard.createBy.trim() != ''">
AND CREATE_BY = #{tSalaryConfigStandard.createBy}
</if>
<if test="tSalaryConfigStandard.createTime != null">
AND CREATE_TIME = #{tSalaryStandard.createTime}
......@@ -56,7 +56,7 @@
MODEL_TYPE,
IS_MUST_NEED,
IS_TAX,
CREATE_USER,
CREATE_BY,
CREATE_TIME
FROM t_salary_config_standard
<where>
......
......@@ -267,10 +267,15 @@
<where>
1=1
<include refid="where_export"/>
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
</if>
</if>
</where>
</select>
<!--tSalaryStandard简单分页查询-->
<select id="getSalaryStandardExportCount" resultType="java.lang.Integer" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo">
<select id="getSalaryStandardExportCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_salary_standard a
......@@ -315,9 +320,6 @@
<if test="searchVo.status != null">
AND a.STATUS = #{searchVo.status}
</if>
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
</if>
</if>
</sql>
</mapper>
......@@ -92,7 +92,7 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因",isNotEmpty = true, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_PROJECT_REASON)
@ExcelAttribute(name = "减少原因",isNotEmpty = true, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "减少原因" )
@ExcelProperty("减少原因" )
private String reasonType;
......
......@@ -84,6 +84,12 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
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