Commit fe4d0a4f authored by huyuchen's avatar huyuchen

稿酬导入修改

parent 1393bede
...@@ -46,7 +46,6 @@ public class TStatisticsDeclarer { ...@@ -46,7 +46,6 @@ public class TStatisticsDeclarer {
* ID * ID
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("ID")
private String id; private String id;
/** /**
* 申报单位 * 申报单位
...@@ -84,13 +83,6 @@ public class TStatisticsDeclarer { ...@@ -84,13 +83,6 @@ public class TStatisticsDeclarer {
@Length(max = 11, message = "手机号码不能超过11个字符") @Length(max = 11, message = "手机号码不能超过11个字符")
@ExcelProperty("手机号码") @ExcelProperty("手机号码")
private String empPhone; private String empPhone;
/**
* 人员状态
*/
@ExcelAttribute(name = "人员状态", maxLength = 2,readConverterExp = "0=在职,1=离职")
@Length(max = 2, message = "人员状态不能超过2个字符")
@ExcelProperty("人员状态")
private String empStatus;
/** /**
* 任职受雇从业类型 * 任职受雇从业类型
*/ */
......
...@@ -33,7 +33,7 @@ import java.math.BigDecimal; ...@@ -33,7 +33,7 @@ import java.math.BigDecimal;
* @date 2022-08-14 21:31:15 * @date 2022-08-14 21:31:15
*/ */
@Data @Data
public class TStatisticsBonusImportVo extends RowIndex implements Serializable { public class TStatisticsBonusImportVo implements Serializable {
/** /**
* 员工姓名 * 员工姓名
......
...@@ -29,14 +29,20 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -29,14 +29,20 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer; import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService; import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
...@@ -54,7 +60,12 @@ import java.util.List; ...@@ -54,7 +60,12 @@ import java.util.List;
*/ */
@Log4j2 @Log4j2
@Service @Service
@EnableConfigurationProperties(DaprArchivesProperties.class)
public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDeclarerMapper, TStatisticsDeclarer> implements TStatisticsDeclarerService { public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDeclarerMapper, TStatisticsDeclarer> implements TStatisticsDeclarerService {
@Autowired
private DaprArchivesProperties archivesProperties;
/** /**
* 申报对象表简单分页查询 * 申报对象表简单分页查询
* @param tStatisticsDeclarer 申报对象表 * @param tStatisticsDeclarer 申报对象表
...@@ -175,6 +186,18 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla ...@@ -175,6 +186,18 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
String lastYear = lastMonth.substring(0,4); String lastYear = lastMonth.substring(0,4);
List<TStatisticsDeclarer> stdvoList = baseMapper.doStatisticsTaxDeclarer(nowMonth,lastYear); List<TStatisticsDeclarer> stdvoList = baseMapper.doStatisticsTaxDeclarer(nowMonth,lastYear);
for (TStatisticsDeclarer declarer : stdvoList) { for (TStatisticsDeclarer declarer : stdvoList) {
if (Common.isNotNull(declarer.getDeclareUnit())) {
R<TSettleDomainSelectVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/tsettledomain/inner/getSettleDomainVoById", declarer.getDeclareUnit(), TSettleDomainSelectVo.class, SecurityConstants.FROM_IN);
// 结算主体
TSettleDomainSelectVo dept = null;
if (sdr != null && sdr.getData() != null) {
dept = sdr.getData();
}
if (Common.isNotNull(dept)) {
declarer.setDeclareUnit(dept.getBusinessSubjectName());
}
}
this.save(declarer); this.save(declarer);
} }
return R.ok(); return R.ok();
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/> <result property="empIdcard" column="EMP_IDCARD"/>
<result property="empPhone" column="EMP_PHONE"/> <result property="empPhone" column="EMP_PHONE"/>
<result property="empStatus" column="EMP_STATUS"/>
<result property="occupationType" column="OCCUPATION_TYPE"/> <result property="occupationType" column="OCCUPATION_TYPE"/>
<result property="occupationMonth" column="OCCUPATION_MONTH"/> <result property="occupationMonth" column="OCCUPATION_MONTH"/>
<result property="isDeclare" column="IS_DECLARE"/> <result property="isDeclare" column="IS_DECLARE"/>
...@@ -43,7 +42,6 @@ ...@@ -43,7 +42,6 @@
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
a.EMP_PHONE, a.EMP_PHONE,
a.EMP_STATUS,
a.OCCUPATION_TYPE, a.OCCUPATION_TYPE,
a.OCCUPATION_MONTH, a.OCCUPATION_MONTH,
a.IS_DECLARE, a.IS_DECLARE,
...@@ -69,9 +67,6 @@ ...@@ -69,9 +67,6 @@
<if test="tStatisticsDeclarer.empPhone != null and tStatisticsDeclarer.empPhone.trim() != ''"> <if test="tStatisticsDeclarer.empPhone != null and tStatisticsDeclarer.empPhone.trim() != ''">
AND a.EMP_PHONE = #{tStatisticsDeclarer.empPhone} AND a.EMP_PHONE = #{tStatisticsDeclarer.empPhone}
</if> </if>
<if test="tStatisticsDeclarer.empStatus != null and tStatisticsDeclarer.empStatus.trim() != ''">
AND a.EMP_STATUS = #{tStatisticsDeclarer.empStatus}
</if>
<if test="tStatisticsDeclarer.occupationType != null and tStatisticsDeclarer.occupationType.trim() != ''"> <if test="tStatisticsDeclarer.occupationType != null and tStatisticsDeclarer.occupationType.trim() != ''">
AND a.OCCUPATION_TYPE = #{tStatisticsDeclarer.occupationType} AND a.OCCUPATION_TYPE = #{tStatisticsDeclarer.occupationType}
</if> </if>
...@@ -101,11 +96,11 @@ ...@@ -101,11 +96,11 @@
<!--统计--> <!--统计-->
<select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap"> <select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap">
select select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,b.FILE_STATUS EMP_STATUS, #{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,b.UNIT_ID DECLARE_UNIT,
b.UNIT_NAME DECLARE_UNIT,'雇员' OCCUPATION_TYPE if(a.FORM_TYPE=0,'雇员',if(a.FORM_TYPE=3 or a.FORM_TYPE=4,'其他','-')) OCCUPATION_TYPE
from t_salary_account a from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID left join t_salary_employee b on b.id = a.EMP_ID
where a.DELETE_FLAG = '0' and a.SETTLEMENT_MONTH like '${lastYear}%' where a.DELETE_FLAG = '0' and a.SETTLEMENT_MONTH like '${lastYear}%'
GROUP BY a.EMP_IDCARD GROUP BY a.EMP_IDCARD,OCCUPATION_TYPE,b.UNIT_ID,a.SETTLEMENT_MONTH
</select> </select>
</mapper> </mapper>
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