Commit ec4ce452 authored by hongguangwu's avatar hongguangwu

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

parents a2f9af11 d91c0993
...@@ -1026,14 +1026,14 @@ public class InsurancesConstants { ...@@ -1026,14 +1026,14 @@ public class InsurancesConstants {
/** /**
* 预估 * 预估
*/ */
public static final String ESTIMATE_SETTLE_BILL = "预估"; public static final String ESTIMATE_SETTLE_BILL = "预估";
/** /**
* 实缴 * 实缴
*/ */
public static final String ACTUAL_SETTLE_BILL = "实缴"; public static final String ACTUAL_SETTLE_BILL = "实缴";
/** /**
* 新增结算单 * 新增结算单
...@@ -1041,15 +1041,20 @@ public class InsurancesConstants { ...@@ -1041,15 +1041,20 @@ public class InsurancesConstants {
public static final String NEW_SETTLE_BILL = "新增结算单"; public static final String NEW_SETTLE_BILL = "新增结算单";
/** /**
* 结算中 * 更新结算单信息
*/ */
public static final String UPDATE_SETTLE_BILL = "更新结算单信息"; public static final String UPDATE_SETTLE_BILL = "更新结算单信息";
/** /**
* 结算中 * 作废结算单信息
*/ */
public static final String ABOLISH_SETTLE_BILL = "作废结算单信息"; public static final String ABOLISH_SETTLE_BILL = "作废结算单信息";
/**
* 红冲结算单信息
*/
public static final String CORRECT_SETTLE_BILL = "红冲结算单信息";
} }
...@@ -1257,7 +1257,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1257,7 +1257,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
updateBatchById(successList); updateBatchById(successList);
if (CollectionUtils.isNotEmpty(successList)){ if (CollectionUtils.isNotEmpty(successList)){
threadPool.execute(() -> { //threadPool.execute(() -> {
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送) //根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
for (TInsuranceDetail tInsuranceDetail : successList) { for (TInsuranceDetail tInsuranceDetail : successList) {
Integer settleType = tInsuranceDetail.getSettleType(); Integer settleType = tInsuranceDetail.getSettleType();
...@@ -1275,7 +1275,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1275,7 +1275,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
} }
}); //});
} }
//根据项目编码获取项目名称 //根据项目编码获取项目名称
setProjectNameByDeptNo(errorList); setProjectNameByDeptNo(errorList);
......
...@@ -38,6 +38,58 @@ public class OrderConstants { ...@@ -38,6 +38,58 @@ public class OrderConstants {
* 订单编号不能为空 * 订单编号不能为空
*/ */
public static final String ORDER_NO_IS_EMPTY = "订单编号不能为空"; public static final String ORDER_NO_IS_EMPTY = "订单编号不能为空";
/**
* 订单不存在
*/
public static final String ORDER_NO_NOT_EXIST = "订单不存在";
/**
* 订单已存在
*/
public static final String ORDER_NO_IS_EXIST = "订单已存在";
/**
* 下单人不能为空
*/
public static final String ORDER_NAME_IS_EMPTY = "下单人不能为空";
/**
* 下单时间不能为空
*/
public static final String ORDER_TIME_IS_EMPTY = "下单时间不能为空";
/**
* 项目编码不能为空
*/
public static final String DEPT_NO_IS_EMPTY = "项目编码不能为空";
/**
* 项目名称不能为空
*/
public static final String DEPT_NAME_IS_EMPTY = "项目名称不能为空";
/**
* 客户名称不能为空
*/
public static final String CUSTOMER_NAME_IS_EMPTY = "客户名称不能为空";
/**
* 订单状态不能为空
*/
public static final String ORDER_STATUS_IS_EMPTY = "订单状态不能为空";
/**
* 订单内容不能为空
*/
public static final String ORDER_CONTENT_IS_EMPTY = "订单内容不能为空";
/**
* 订单内容,200字以内
*/
public static final String ORDER_CONTENT_MORE_THAN_200 = "订单内容,200字以内";
/**
* 处理人不能为空
*/
public static final String HANDLE_USER_IS_EMPTY = "处理人不能为空";
/**
* 回复人不能为空
*/
public static final String REPLY_NAME_IS_EMPTY = "回复人不能为空";
/**
* 回复时间不能为空
*/
public static final String REPLY_TIME_IS_EMPTY = "回复时间不能为空";
/** /**
* 回复内容和附件,两者必填其一 * 回复内容和附件,两者必填其一
*/ */
......
...@@ -71,7 +71,6 @@ public class TOrder implements Serializable { ...@@ -71,7 +71,6 @@ public class TOrder implements Serializable {
*/ */
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间(下单时间)") @Schema(description = "创建时间(下单时间)")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime; private LocalDateTime createTime;
/** /**
...@@ -91,7 +90,7 @@ public class TOrder implements Serializable { ...@@ -91,7 +90,7 @@ public class TOrder implements Serializable {
*/ */
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "更新时间") @Schema(description = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE) @TableField(fill = FieldFill.UPDATE)
private LocalDateTime updateTime; private LocalDateTime updateTime;
/** /**
......
package com.yifu.cloud.plus.v1.yifu.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 订单处理人表 t_order_handler
* @date 2022-08-31 09:20:16
*/
@Data
@TableName("t_order_handler")
@Schema(description = "订单处理人表")
public class TOrderHandler implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 订单处理人(用户名)
*/
@Schema(description = "订单处理人(用户名)")
private String handleUser;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -47,7 +47,6 @@ public class TOrderReply implements Serializable { ...@@ -47,7 +47,6 @@ public class TOrderReply implements Serializable {
*/ */
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间(回复时间)") @Schema(description = "创建时间(回复时间)")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime; private LocalDateTime createTime;
/** /**
......
package com.yifu.cloud.plus.v1.yifu.order.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author licancan
* @description 订单新增vo
* @date 2022-08-31 08:36:32
*/
@Data
public class OrderAddVO implements Serializable {
private static final long serialVersionUID = 6620652346415180825L;
/**
* 创建人姓名(下单人)
*/
@Schema(description = "创建人姓名(下单人)")
private String createName;
/**
* 创建时间(下单时间)
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间(下单时间)")
private LocalDateTime createTime;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String deptName;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 客户名称
*/
@Schema(description = "客户名称")
private String customerName;
/**
* 订单状态 0待办理 1办理中 2已办结
*/
@Schema(description = "订单状态 0待办理 1办理中 2已办结")
private Integer orderStatus;
/**
* 订单内容
*/
@Schema(description = "订单内容")
private String orderContent;
/**
* 指派人(处理人)
*/
@Schema(description = "指派人(处理人)")
private List<String> handleUserList;
/**
* 附件
*/
@Schema(description = "附件")
private MultipartFile[] file;
}
package com.yifu.cloud.plus.v1.yifu.order.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author licancan
* @description 订单回复新增vo
* @date 2022-08-31 08:36:32
*/
@Data
public class OrderReplyAddVO implements Serializable {
private static final long serialVersionUID = 5043110315841697190L;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 回复内容
*/
@Schema(description = "回复内容")
private String replyContent;
/**
* 创建人姓名(回复人)
*/
@Schema(description = "创建人姓名(回复人)")
private String createName;
/**
* 创建时间(回复时间)
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间(回复时间)")
private LocalDateTime createTime;
/**
* 附件
*/
@Schema(description = "附件")
private MultipartFile[] file;
}
package com.yifu.cloud.plus.v1.yifu.order.controller;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderService;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderAddVO;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyAddVO;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.IOException;
/**
* @author licancan
* @description 接收ekp订单controller
* @date 2022-08-31 08:54:06
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/ekp/order")
@Tag(name = "接收ekp订单相关")
public class EkpOrderController {
@Resource
private TOrderService tOrderService;
/**
* 接收处理ekp订单
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Schema(description = "接收处理ekp订单")
@PostMapping(value = "/receiveOrder")
public R receiveOrder(OrderAddVO vo) throws IOException {
return tOrderService.receiveOrder(vo);
}
/**
* 接收处理ekp订单回复
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Schema(description = "接收处理ekp订单回复")
@PostMapping(value = "/receiveOrderReply")
public R receiveOrderReply(OrderReplyAddVO vo) throws IOException {
return tOrderService.receiveOrderReply(vo);
}
}
package com.yifu.cloud.plus.v1.yifu.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.order.entity.TOrderHandler;
import org.apache.ibatis.annotations.Mapper;
/**
* @author licancan
* @description 针对表【t_order_handler(订单处理人表)】的数据库操作Mapper
* @date 2022-08-31 09:20:16
*/
@Mapper
public interface TOrderHandlerMapper extends BaseMapper<TOrderHandler> {
}
...@@ -28,9 +28,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> { ...@@ -28,9 +28,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> {
* @author licancan * @author licancan
* @param page * @param page
* @param param * @param param
* @param userName
* @return {@link IPage<OrderListVO>} * @return {@link IPage<OrderListVO>}
*/ */
IPage<OrderListVO> getOrderPageList(Page<OrderListParam> page,@Param("param") OrderListParam param); IPage<OrderListVO> getOrderPageList(Page<OrderListParam> page,@Param("param") OrderListParam param,@Param("userName") String userName);
/** /**
* 导出勾选查询结果 * 导出勾选查询结果
...@@ -46,9 +47,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> { ...@@ -46,9 +47,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> {
* *
* @author licancan * @author licancan
* @param param * @param param
* @param userName
* @return {@link List< OrderListVO>} * @return {@link List< OrderListVO>}
*/ */
List<OrderListVO> getOrderList(@Param("param") OrderListParam param); List<OrderListVO> getOrderList(@Param("param") OrderListParam param,@Param("userName") String userName);
/** /**
* 通过id查询详情 * 通过id查询详情
......
package com.yifu.cloud.plus.v1.yifu.order.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.order.entity.TOrderHandler;
/**
* @author licancan
* @description 针对表【t_order_handler(订单处理人表)】的数据库操作Service
* @date 2022-08-31 09:20:16
*/
public interface TOrderHandlerService extends IService<TOrderHandler> {
}
...@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; 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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.order.entity.TOrder; import com.yifu.cloud.plus.v1.yifu.order.entity.TOrder;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO; import com.yifu.cloud.plus.v1.yifu.order.vo.*;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderListParam;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyListVO;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.IOException; import java.io.IOException;
...@@ -91,4 +88,24 @@ public interface TOrderService extends IService<TOrder> { ...@@ -91,4 +88,24 @@ public interface TOrderService extends IService<TOrder> {
* @return {@link IPage< OrderReplyListVO>} * @return {@link IPage< OrderReplyListVO>}
*/ */
IPage<OrderReplyListVO> getOrderReplyPageList(Page<OrderReplyListVO> page, String orderNo); IPage<OrderReplyListVO> getOrderReplyPageList(Page<OrderReplyListVO> page, String orderNo);
/**
* 接收处理ekp订单
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
R receiveOrder(OrderAddVO vo) throws IOException;
/**
* 接收处理ekp订单回复
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
R receiveOrderReply(OrderReplyAddVO vo) throws IOException;
} }
package com.yifu.cloud.plus.v1.yifu.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.order.entity.TOrderHandler;
import com.yifu.cloud.plus.v1.yifu.order.mapper.TOrderHandlerMapper;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderHandlerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @author licancan
* @description 针对表【t_order_handler(订单处理人表)】的数据库操作Service实现
* @date 2022-08-31 09:20:16
*/
@Slf4j
@Service
public class TOrderHandlerServiceImpl extends ServiceImpl<TOrderHandlerMapper, TOrderHandler> implements TOrderHandlerService {
}
...@@ -14,7 +14,6 @@ import org.springframework.stereotype.Service; ...@@ -14,7 +14,6 @@ import org.springframework.stereotype.Service;
*/ */
@Slf4j @Slf4j
@Service @Service
public class TOrderReplyServiceImpl extends ServiceImpl<TOrderReplyMapper, TOrderReply> public class TOrderReplyServiceImpl extends ServiceImpl<TOrderReplyMapper, TOrderReply> implements TOrderReplyService {
implements TOrderReplyService {
} }
...@@ -39,6 +39,8 @@ security: ...@@ -39,6 +39,8 @@ security:
- /v3/api-docs - /v3/api-docs
- /actuator/** - /actuator/**
- /swagger-ui/** - /swagger-ui/**
- /ekp/order/receiveOrder
- /ekp/order/receiveOrderReply
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.order.mapper.TOrderHandlerMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.order.entity.TOrderHandler">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
<result property="handleUser" column="HANDLE_USER" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,ORDER_NO,HANDLE_USER
</sql>
</mapper>
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
t.ORDER_STATUS as orderStatus t.ORDER_STATUS as orderStatus
from t_order t from t_order t
where t.DELETE_FLAG = 0 where t.DELETE_FLAG = 0
and #{userName} in (SELECT HANDLE_USER FROM t_order_handler h WHERE h.ORDER_NO = t.ORDER_NO)
<if test="param.orderNo != null and param.orderNo.trim() != ''"> <if test="param.orderNo != null and param.orderNo.trim() != ''">
and t.ORDER_NO = #{param.orderNo} and t.ORDER_NO = #{param.orderNo}
</if> </if>
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
<if test="param.orderStatus != null"> <if test="param.orderStatus != null">
and t.ORDER_STATUS = #{param.orderStatus} and t.ORDER_STATUS = #{param.orderStatus}
</if> </if>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC ORDER BY t.CREATE_TIME DESC
</select> </select>
<select id="getOrderListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO"> <select id="getOrderListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO">
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC ORDER BY t.CREATE_TIME DESC
</select> </select>
<select id="getOrderList" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO"> <select id="getOrderList" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO">
...@@ -91,6 +92,7 @@ ...@@ -91,6 +92,7 @@
t.ORDER_STATUS as orderStatus t.ORDER_STATUS as orderStatus
from t_order t from t_order t
where t.DELETE_FLAG = 0 where t.DELETE_FLAG = 0
and #{userName} in (SELECT HANDLE_USER FROM t_order_handler h WHERE h.ORDER_NO = t.ORDER_NO)
<if test="param.orderNo != null and param.orderNo.trim() != ''"> <if test="param.orderNo != null and param.orderNo.trim() != ''">
and t.ORDER_NO = #{param.orderNo} and t.ORDER_NO = #{param.orderNo}
</if> </if>
...@@ -112,7 +114,7 @@ ...@@ -112,7 +114,7 @@
<if test="param.orderStatus != null"> <if test="param.orderStatus != null">
and t.ORDER_STATUS = #{param.orderStatus} and t.ORDER_STATUS = #{param.orderStatus}
</if> </if>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC ORDER BY t.CREATE_TIME DESC
</select> </select>
<select id="getOrderDetailById" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO"> <select id="getOrderDetailById" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO">
......
...@@ -128,4 +128,17 @@ public class TStatisticsLaborController { ...@@ -128,4 +128,17 @@ public class TStatisticsLaborController {
public R doStatisticsLabor() { public R doStatisticsLabor() {
return tStatisticsLaborService.doStatisticsLabor(); return tStatisticsLaborService.doStatisticsLabor();
} }
/**
* @param
* @Description: 手动刷新
* @Author: huyc
* @Date: 2022-08-31 18:17:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Operation(description = "手动刷新")
@PostMapping("/refreshStatisticsLabor")
public R refreshStatisticsLabor(@RequestParam String declareMonth) {
return tStatisticsLaborService.refreshStatisticsLabor(declareMonth);
}
} }
...@@ -127,4 +127,17 @@ public class TStatisticsRemunerationController { ...@@ -127,4 +127,17 @@ public class TStatisticsRemunerationController {
public R doStatisticsRemuneration() { public R doStatisticsRemuneration() {
return tStatisticsRemunerationService.doStatisticsRemuneration(); return tStatisticsRemunerationService.doStatisticsRemuneration();
} }
/**
* @param
* @Description: 手动刷新
* @Author: huyc
* @Date: 2022-08-31 18:17:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Operation(description = "手动刷新")
@PostMapping("/refreshStatisticsRemuneration")
public R refreshStatisticsRemuneration(@RequestParam String declareMonth) {
return tStatisticsRemunerationService.refreshStatisticsRemuneration(declareMonth);
}
} }
...@@ -61,4 +61,10 @@ public interface TStatisticsLaborService extends IService<TStatisticsLabor> { ...@@ -61,4 +61,10 @@ public interface TStatisticsLaborService extends IService<TStatisticsLabor> {
* @return * @return
**/ **/
R doStatisticsLabor(); R doStatisticsLabor();
/** 手动刷新生成本期劳务费
* @param
* @return
**/
R refreshStatisticsLabor(String declareMonth);
} }
...@@ -55,4 +55,10 @@ public interface TStatisticsRemunerationService extends IService<TStatisticsRemu ...@@ -55,4 +55,10 @@ public interface TStatisticsRemunerationService extends IService<TStatisticsRemu
**/ **/
R doStatisticsRemuneration(); R doStatisticsRemuneration();
/** 手动刷新生成本期稿酬
* @param
* @return
**/
R refreshStatisticsRemuneration(String declareMonth);
} }
...@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsLaborMapper; ...@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsLaborMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsLaborService; import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsLaborService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPreDispatchInfo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -262,6 +263,24 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap ...@@ -262,6 +263,24 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
} }
} }
@Override
public R refreshStatisticsLabor(String declareMonth) {
TStatisticsLabor std = new TStatisticsLabor();
std.setDeclareMonth(declareMonth);
QueryWrapper<TStatisticsLabor> queryWrapperSs = new QueryWrapper<>();
queryWrapperSs.setEntity(std);
long num = this.count(queryWrapperSs);
if (num > 0) {
baseMapper.delete(Wrappers.<TStatisticsLabor>query().lambda().eq(TStatisticsLabor::getDeclareMonth,declareMonth));
}
String lastMonth = DateUtil.addMonthByYearMonth(-1,declareMonth); //上月
List<TStatisticsLabor> stdvoList = baseMapper.doStatisticsLabor(declareMonth,lastMonth);
for (TStatisticsLabor declarer : stdvoList) {
this.save(declarer);
}
return R.ok();
}
private void importTStatisticsLabor(List<TStatisticsLaborVo> excelVOList, List<ErrorMessage> errorMessageList) { private void importTStatisticsLabor(List<TStatisticsLaborVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑 // 个性化校验逻辑
ErrorMessage errorMsg; ErrorMessage errorMsg;
......
...@@ -30,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -30,6 +30,7 @@ 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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil; 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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration; 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.mapper.TStatisticsRemunerationMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsRemunerationService; import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsRemunerationService;
...@@ -164,6 +165,24 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR ...@@ -164,6 +165,24 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
} }
} }
@Override
public R refreshStatisticsRemuneration(String declareMonth) {
TStatisticsRemuneration std = new TStatisticsRemuneration();
std.setDeclareMonth(declareMonth);
QueryWrapper<TStatisticsRemuneration> queryWrapperSs = new QueryWrapper<>();
queryWrapperSs.setEntity(std);
long num = this.count(queryWrapperSs);
if (num > 0) {
baseMapper.delete(Wrappers.<TStatisticsRemuneration>query().lambda().eq(TStatisticsRemuneration::getDeclareMonth,declareMonth));
}
String lastMonth = DateUtil.addMonthByYearMonth(-1,declareMonth); //上月
List<TStatisticsRemuneration> stdvoList = baseMapper.doStatisticsRemuneration(declareMonth,lastMonth);
for (TStatisticsRemuneration remuneration : stdvoList) {
this.save(remuneration);
}
return R.ok();
}
private List<TStatisticsRemuneration> noPageDiy(TStatisticsRemunerationSearchVo searchVo) { private List<TStatisticsRemuneration> noPageDiy(TStatisticsRemunerationSearchVo searchVo) {
LambdaQueryWrapper<TStatisticsRemuneration> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TStatisticsRemuneration> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds()); List<String> idList = Common.getList(searchVo.getIds());
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
<if test="sysMessageSalary.actualSalary != null"> <if test="sysMessageSalary.actualSalary != null">
AND a.actual_salary = #{sysMessageSalary.actualSalary} AND a.actual_salary = #{sysMessageSalary.actualSalary}
</if> </if>
<if test="sysMessageSalary.createName != null">
AND a.CREATE_NAME = #{sysMessageSalary.createName}
</if>
<if test="sysMessageSalary.salaryBase != null"> <if test="sysMessageSalary.salaryBase != null">
AND a.salary_base = #{sysMessageSalary.salaryBase} AND a.salary_base = #{sysMessageSalary.salaryBase}
</if> </if>
......
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