Commit a960d2e6 authored by hongguangwu's avatar hongguangwu

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

parents 4af71b2b 44e53e33
......@@ -89,6 +89,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(updateTEmployeeProject)) {
if (updateTEmployeeProject.getSocialStatus() == CommonConstants.dingleDigitIntArray[1] ||
updateTEmployeeProject.getFundStatus() == CommonConstants.dingleDigitIntArray[1]) {
return R.failed("人员在原项目中存在在途的服务,请先终止后,再进行划转");
}
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmpChangeInfo.getDeptNo()).eq(TSettleDomain::getDepartName, tEmpChangeInfo.getNewSettle())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING).eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
......@@ -172,6 +177,10 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeePro)) {
if (updateTEmployeePro.getSocialStatus() == CommonConstants.dingleDigitIntArray[1] ||
updateTEmployeePro.getFundStatus() == CommonConstants.dingleDigitIntArray[1]) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.QT_PROJECT_CHANGE_NOT_EXIST, excel.getOldSettleCode()));
}
if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
} else if (Common.isNotNull(tSettleDomain)) {
......
......@@ -30,6 +30,7 @@ public class ChecksUtil {
private static final String API_URL = "https://api.253.com/open/idcard/id-card-auth";
private static final String API_URL_MOBILE = "https://api.253.com/open/unn/batch-ucheck";
private static final String API_URL_BANK_NO ="https://api.253.com/open/bankcard/card-auth";
private static final String API_URL_BANK_NO_THREE ="https://api.253.com/open/bankcard/card-two-auth";
private static JsonParser jsonParser = new JsonParser();
public static void checkIdCard(TCheckIdCard checkIdCard, boolean canCheck) {
......
......@@ -300,7 +300,7 @@ public interface ErrorCodes {
*/
String ARCHIVES_PROJECT_CHANGE_NOT_EXIST = "archives.project.change.not.exist";
/**
* 该人员存在其他进行中的项目,禁止同步减档!
* 人员在原项目中存在在途的服务,请先终止后,再进行划转
*/
String QT_PROJECT_CHANGE_NOT_EXIST = "qt.project.change.not.exist";
/**
......
......@@ -99,7 +99,7 @@ archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B
archives.project.emp.lose.fee.not.empty=\u4E0D\u826F\u8BB0\u5F55\u8D39\u7528\u635F\u5931\u548C\u5176\u4ED6\u635F\u5931\u4E0D\u53EF\u540C\u65F6\u4E3A\u7A7A
qt.project.change.not.exist=\u8BE5\u4EBA\u5458\u5B58\u5728\u5176\u4ED6\u8FDB\u884C\u4E2D\u7684\u9879\u76EE\uFF0C\u7981\u6B62\u540C\u6B65\u51CF\u6863
qt.project.change.not.exist=\u4EBA\u5458\u5728\u539F\u9879\u76EE\u4E2D\u5B58\u5728\u5728\u9014\u7684\u670D\u52A1\uFF0C\u8BF7\u5148\u7EC8\u6B62\u540E\uFF0C\u518D\u8FDB\u884C\u5212\u8F6C
project.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u9879\u76EE\uFF0C\u8BF7\u6838\u5B9E
change.strat.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u4E0D\u80FD\u4E3A\u7A7A
......
......@@ -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;
......@@ -27,7 +28,7 @@ import java.time.LocalDateTime;
@EqualsAndHashCode(callSuper = true)
@TableName("t_min_salary")
@Tag(name = "薪资配置-最低工资配置")
public class TMinSalary extends Model<TMinSalary> {
public class TMinSalary extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* id
......@@ -80,17 +81,4 @@ public class TMinSalary extends Model<TMinSalary> {
@ExcelAttribute(name = "终止时间")
@ExcelProperty(value = "终止时间")
private LocalDate endDate;
/**
* 创建人
*/
@Length(max = 32, message = "创建人不能超过32个字符")
@ExcelAttribute(name = "创建人", maxLength = 32)
@ExcelProperty(value = "创建人")
private String createUser;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间")
@ExcelProperty(value = "创建时间")
private LocalDateTime createDate;
}
......@@ -66,9 +66,9 @@ public class TStatisticsDeclarer {
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", maxLength = 20)
@Length(max = 20, message = "员工姓名不能超过20个字符")
@ExcelProperty("员工姓名")
@ExcelAttribute(name = "姓名", maxLength = 20)
@Length(max = 20, message = "姓名不能超过20个字符")
@ExcelProperty("姓名")
private String empName;
/**
* 身份证号
......@@ -87,14 +87,14 @@ public class TStatisticsDeclarer {
/**
* 人员状态
*/
@ExcelAttribute(name = "人员状态", maxLength = 2)
@ExcelAttribute(name = "人员状态", maxLength = 2,readConverterExp = "0=在职,1=离职")
@Length(max = 2, message = "人员状态不能超过2个字符")
@ExcelProperty("人员状态")
private String empStatus;
/**
* 任职受雇从业类型
*/
@ExcelAttribute(name = "任职受雇从业类型", maxLength = 2)
@ExcelAttribute(name = "任职受雇从业类型", maxLength = 2,readConverterExp = "0=雇员,1=其他")
@Length(max = 2, message = "任职受雇从业类型不能超过2个字符")
@ExcelProperty("任职受雇从业类型")
private String occupationType;
......@@ -108,9 +108,9 @@ public class TStatisticsDeclarer {
/**
* 本月是否申报 0 是 1 否
*/
@ExcelAttribute(name = "本月是否申报", maxLength = 1)
@Length(max = 1, message = "本是否申报不能超过1个字符")
@ExcelProperty("本是否申报")
@ExcelAttribute(name = "本期是否申报", maxLength = 1,readConverterExp = "0=是,1=否")
@Length(max = 1, message = "本是否申报不能超过1个字符")
@ExcelProperty("本是否申报")
private String isDeclare;
/**
* 不申报原因
......
......@@ -43,9 +43,9 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", maxLength = 20, isNotEmpty = true)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
@ExcelAttribute(name = "姓名", maxLength = 20, isNotEmpty = true)
@Schema(description = "姓名")
@ExcelProperty("姓名")
private String empName;
/**
* 身份证号
......@@ -57,9 +57,9 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
/**
* 本月是否申报
*/
@ExcelAttribute(name = "本月是否申报", maxLength = 1, isNotEmpty = true,isDataId = true,readConverterExp = "0=是,1=否")
@Schema(description = "本是否申报")
@ExcelProperty("本是否申报")
@ExcelAttribute(name = "本期是否申报", maxLength = 1, isNotEmpty = true,readConverterExp = "0=是,1=否")
@Schema(description = "本是否申报")
@ExcelProperty("本是否申报")
private String isDeclare;
/**
* 不申报原因
......
......@@ -73,8 +73,8 @@ public class TMinSalaryController {
if (null == user || null == user.getId()) {
return R.failed("获取登录用户信息失败!");
}
tMinSalary.setCreateDate(LocalDateTime.now());
tMinSalary.setCreateUser(String.valueOf(user.getId()));
tMinSalary.setCreateTime(LocalDateTime.now());
tMinSalary.setCreateBy(String.valueOf(user.getId()));
return new R<>(tMinSalaryService.save(tMinSalary));
}
......
......@@ -136,7 +136,7 @@ public class TStatisticsBonusController {
@SysLog("批量删除全年一次性奖金申报表")
@PostMapping("/batchDelete")
@PreAuthorize("@pms.hasPermission('salary_tstatisticsbonus_del')")
public R batchDelete(@RequestBody String declareMonth){
public R batchDelete(@RequestParam String declareMonth){
return tStatisticsBonusService.batchDelete(declareMonth);
}
}
......@@ -79,7 +79,7 @@ public class TStatisticsDeclarerController {
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('salary_tstatisticsdeclarer_get')")
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
public R<TStatisticsDeclarer> getById(@PathVariable("id" ) String id) {
return R.ok(tStatisticsDeclarerService.getById(id));
......@@ -147,7 +147,7 @@ public class TStatisticsDeclarerController {
**/
@Operation(description = "导出申报对象表 hasPermission('salary_tstatisticsdeclarer-export')")
@PostMapping("/export")
// @PreAuthorize("@pms.hasPermission('salary_tstatisticsdeclarer-export')")
@PreAuthorize("@pms.hasPermission('salary_tstatisticsdeclarer-export')")
public void export(HttpServletResponse response, @RequestBody TStatisticsDeclarerSearchVo searchVo) {
tStatisticsDeclarerService.listExport(response,searchVo);
}
......
......@@ -99,4 +99,18 @@ public class TStatisticsLaborController {
public void export(HttpServletResponse response, @RequestBody TStatisticsLaborSearchVo searchVo) {
tStatisticsLaborService.listExport(response, searchVo);
}
/**
* 本期劳务费申报表 批量删除
*
* @author huyc
* @date 2022-08-14 21:31:15
**/
@Operation(description = "批量删除本期劳务费申报表 hasPermission('salary_tstatisticslabor_del')")
@SysLog("批量删除本期稿酬申报表")
@PostMapping("/batchDelete")
@PreAuthorize("@pms.hasPermission('salary_tstatisticslabor_del')")
public R batchDelete(@RequestBody String declareMonth){
return tStatisticsLaborService.batchDelete(declareMonth);
}
}
......@@ -47,7 +47,6 @@ public class TStatisticsRemunerationController {
private final TStatisticsRemunerationService tStatisticsRemunerationService;
/**
* 简单分页查询
*
......@@ -67,7 +66,7 @@ public class TStatisticsRemunerationController {
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('salary_tstatisticsremuneration_get')")
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<TStatisticsRemuneration> getById(@PathVariable("id") String id) {
return R.ok(tStatisticsRemunerationService.getById(id));
......@@ -99,4 +98,18 @@ public class TStatisticsRemunerationController {
public void export(HttpServletResponse response, @RequestBody TStatisticsRemunerationSearchVo searchVo) {
tStatisticsRemunerationService.listExport(response, searchVo);
}
/**
* 本期稿酬申报表 批量删除
*
* @author huyc
* @date 2022-08-14 21:31:15
**/
@Operation(description = "批量删除本期稿酬申报表 hasPermission('salary_tstatisticsremuneration_del')")
@SysLog("批量删除本期稿酬申报表")
@PostMapping("/batchDelete")
@PreAuthorize("@pms.hasPermission('salary_tstatisticsbonus_del')")
public R batchDelete(@RequestBody String declareMonth){
return tStatisticsRemunerationService.batchDelete(declareMonth);
}
}
......@@ -48,4 +48,11 @@ public interface TStatisticsLaborService extends IService<TStatisticsLabor> {
void listExport(HttpServletResponse response, TStatisticsLaborSearchVo searchVo);
List<TStatisticsLabor> noPageDiy(TStatisticsLaborSearchVo searchVo);
/**
* 批量删除本期稿酬申报表
* @param declareMonth 申报月份
* @return
*/
R batchDelete(String declareMonth);
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsRemunerationSearchVo;
......@@ -41,4 +42,11 @@ public interface TStatisticsRemunerationService extends IService<TStatisticsRemu
void listExport(HttpServletResponse response, TStatisticsRemunerationSearchVo searchVo);
/**
* 批量删除本期稿酬申报表
* @param declareMonth 申报月份
* @return
*/
R batchDelete(String declareMonth);
}
......@@ -46,6 +46,7 @@ import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 本期劳务费申报表
......@@ -74,7 +75,7 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
*/
@Override
public void listExport(HttpServletResponse response, TStatisticsLaborSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "本期劳务费导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TStatisticsLabor> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......@@ -85,7 +86,6 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
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, TStatisticsLabor.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
......@@ -156,6 +156,15 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
private LambdaQueryWrapper buildQueryWrapper(TStatisticsLaborSearchVo entity) {
LambdaQueryWrapper<TStatisticsLabor> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(entity.getDeclareMonth())) {
wrapper.eq(TStatisticsLabor::getDeclareMonth,entity.getDeclareMonth());
}
if (Common.isNotNull(entity.getEmpName())) {
wrapper.eq(TStatisticsLabor::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())) {
wrapper.eq(TStatisticsLabor::getEmpIdcard,entity.getEmpIdcard());
}
return wrapper;
}
......@@ -217,6 +226,21 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
return R.ok(errorMessageList);
}
@Override
public R batchDelete(String declareMonth) {
if (Common.isNotNull(declareMonth)) {
List<TStatisticsLabor> deleteList = baseMapper.selectList(Wrappers.<TStatisticsLabor>query().lambda()
.eq(TStatisticsLabor::getDeclareMonth, declareMonth));
if (Common.isNotNull(deleteList)) {
List<String> idList = deleteList.stream().map(TStatisticsLabor::getId).collect(Collectors.toList());
baseMapper.deleteBatchIds(idList);
return R.ok();
}
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
return null;
}
private void importTStatisticsLabor(List<TStatisticsLaborVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
ErrorMessage errorMsg;
......
......@@ -28,6 +28,7 @@ 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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsRemunerationMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsRemunerationService;
......@@ -41,6 +42,7 @@ import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 本期稿酬申报表
......@@ -69,7 +71,7 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
*/
@Override
public void listExport(HttpServletResponse response, TStatisticsRemunerationSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "本期稿酬申报表导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TStatisticsRemuneration> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......@@ -80,7 +82,6 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
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, TStatisticsRemuneration.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
......@@ -127,6 +128,21 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
}
}
@Override
public R batchDelete(String declareMonth) {
if (Common.isNotNull(declareMonth)) {
List<TStatisticsRemuneration> deleteList = baseMapper.selectList(Wrappers.<TStatisticsRemuneration>query().lambda()
.eq(TStatisticsRemuneration::getDeclareMonth, declareMonth));
if (Common.isNotNull(deleteList)) {
List<String> idList = deleteList.stream().map(TStatisticsRemuneration::getId).collect(Collectors.toList());
baseMapper.deleteBatchIds(idList);
return R.ok();
}
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
return null;
}
private List<TStatisticsRemuneration> noPageDiy(TStatisticsRemunerationSearchVo searchVo) {
LambdaQueryWrapper<TStatisticsRemuneration> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
......@@ -150,6 +166,15 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
private LambdaQueryWrapper buildQueryWrapper(TStatisticsRemunerationSearchVo entity) {
LambdaQueryWrapper<TStatisticsRemuneration> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(entity.getDeclareMonth())) {
wrapper.eq(TStatisticsRemuneration::getDeclareMonth,entity.getDeclareMonth());
}
if (Common.isNotNull(entity.getEmpName())) {
wrapper.eq(TStatisticsRemuneration::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())) {
wrapper.eq(TStatisticsRemuneration::getEmpIdcard,entity.getEmpIdcard());
}
return wrapper;
}
......
......@@ -13,8 +13,8 @@
<result property="status" column="status"/>
<result property="startDate" column="start_date"/>
<result property="endDate" column="end_date"/>
<result property="createUser" column="create_user"/>
<result property="createDate" column="create_date"/>
<result property="createBy" column="create_user"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<!--tMinSalary简单分页查询-->
......@@ -28,8 +28,8 @@
status,
start_date,
end_date,
create_user,
create_date
create_by,
CREATE_TIME
FROM t_min_salary
<where>
1=1
......@@ -57,11 +57,8 @@
<if test="tMinSalary.endDate != null">
AND end_date = #{tMinSalary.endDate}
</if>
<if test="tMinSalary.createUser != null and tMinSalary.createUser.trim() != ''">
AND create_user = #{tMinSalary.createUser}
</if>
<if test="tMinSalary.createDate != null">
AND create_date = #{tMinSalary.createDate}
<if test="tMinSalary.createBy != null and tMinSalary.createBy.trim() != ''">
AND create_user = #{tMinSalary.createBy}
</if>
</where>
</select>
......
......@@ -100,5 +100,6 @@
1=1
<include refid="tStatisticsBonus_where"/>
</where>
order by a.DECLARE_MONTH desc
</select>
</mapper>
......@@ -90,5 +90,7 @@
1=1
<include refid="tStatisticsLabor_where"/>
</where>
group by a.EMP_IDCARD,a.DECLARE_MONTH,a.EMP_NAME
order by a.DECLARE_MONTH desc
</select>
</mapper>
......@@ -85,5 +85,7 @@
1=1
<include refid="tStatisticsRemuneration_where"/>
</where>
group by a.EMP_IDCARD,a.DECLARE_MONTH,a.EMP_NAME
order by a.DECLARE_MONTH desc
</select>
</mapper>
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.archives.config.FddAutoConfigue
\ No newline at end of file
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