Commit d7fcaa90 authored by fangxinjiang's avatar fangxinjiang

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

parents 1b959fb7 d3594b77
...@@ -49,6 +49,7 @@ public class InsurancesDataSourceConfig { ...@@ -49,6 +49,7 @@ public class InsurancesDataSourceConfig {
GlobalConfig globalConfig = new GlobalConfig(); GlobalConfig globalConfig = new GlobalConfig();
globalConfig.setMetaObjectHandler(new MybatisPlusMetaObjectHandler()); globalConfig.setMetaObjectHandler(new MybatisPlusMetaObjectHandler());
globalConfig.setDbConfig(new GlobalConfig.DbConfig()); globalConfig.setDbConfig(new GlobalConfig.DbConfig());
globalConfig.setBanner(false);
bean.setGlobalConfig(globalConfig); bean.setGlobalConfig(globalConfig);
//添加XML目录 //添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
...@@ -57,9 +58,8 @@ public class InsurancesDataSourceConfig { ...@@ -57,9 +58,8 @@ public class InsurancesDataSourceConfig {
//分页插件配置,不配置分页插件无效,否则会出现total为0的情况 //分页插件配置,不配置分页插件无效,否则会出现total为0的情况
bean.setPlugins(insurancesPlusInterceptor()); bean.setPlugins(insurancesPlusInterceptor());
SqlSessionFactory sqlSessionFactory = bean.getObject(); SqlSessionFactory sqlSessionFactory = bean.getObject();
assert sqlSessionFactory != null;
sqlSessionFactory.getConfiguration().setMapUnderscoreToCamelCase(true); sqlSessionFactory.getConfiguration().setMapUnderscoreToCamelCase(true);
return bean.getObject(); return sqlSessionFactory;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new RuntimeException(e); throw new RuntimeException(e);
...@@ -75,8 +75,9 @@ public class InsurancesDataSourceConfig { ...@@ -75,8 +75,9 @@ public class InsurancesDataSourceConfig {
} }
@Bean @Bean(name = "insurancesTransactionManager")
public DataSourceTransactionManager insurancesTransactionManager(@Qualifier("insurancesDataSource") DataSource dataSource) { @Primary
public DataSourceTransactionManager insurancesTransactionManager(@Qualifier("insurancesDataSource") DataSource dataSource) {
return new DataSourceTransactionManager(dataSource); return new DataSourceTransactionManager(dataSource);
} }
@Bean @Bean
......
...@@ -2748,9 +2748,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2748,9 +2748,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param displayFlag 是否显示 0不显示/1显示 * @param displayFlag 是否显示 0不显示/1显示
* @return void * @return void
*/ */
private void addOperate(List<TInsuranceDetail> detailList,YifuUser user,String operateDesc,String remark,Integer displayFlag){ @Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public void addOperate(List<TInsuranceDetail> detailList,YifuUser user,String operateDesc,String remark,Integer displayFlag){
if (CollectionUtils.isNotEmpty(detailList)){ if (CollectionUtils.isNotEmpty(detailList)){
try {
List<TInsuranceOperate> operateList = new ArrayList<>(); List<TInsuranceOperate> operateList = new ArrayList<>();
for (TInsuranceDetail detail : detailList) { for (TInsuranceDetail detail : detailList) {
TInsuranceOperate operate = new TInsuranceOperate(); TInsuranceOperate operate = new TInsuranceOperate();
...@@ -2764,9 +2764,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2764,9 +2764,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operateList.add(operate); operateList.add(operate);
} }
tInsuranceOperateService.saveBatch(operateList); tInsuranceOperateService.saveBatch(operateList);
}catch (Exception e){
e.getStackTrace();
}
} }
} }
...@@ -2779,7 +2776,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2779,7 +2776,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param operateDesc 操作描述 * @param operateDesc 操作描述
* @return void * @return void
*/ */
private void addOperate(List<InsuranceHandleParam> paramList,YifuUser user,String operateDesc){ @Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public void addOperate(List<InsuranceHandleParam> paramList,YifuUser user,String operateDesc){
if (CollectionUtils.isNotEmpty(paramList)){ if (CollectionUtils.isNotEmpty(paramList)){
try { try {
List<TInsuranceOperate> operateList = new ArrayList<>(); List<TInsuranceOperate> operateList = new ArrayList<>();
...@@ -4640,7 +4638,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -4640,7 +4638,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//查数据是否存在权限范围内 //查数据是否存在权限范围内
String regionSQL = getRegionSQL(user); String regionSQL = getRegionSQL(user);
TInsuranceDetail detailByRegionSQL = this.baseMapper.selectByregionSQL(regionSQL,detailId); TInsuranceDetail detailByRegionSQL = this.baseMapper.selectByregionSQL(regionSQL,detailId);
if (!Optional.ofNullable(detailByRegionSQL).isPresent()){ if (!Optional.ofNullable(detailByRegionSQL).isPresent() || !user.getId().equals(detailByRegionSQL.getUpdateBy())){
param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION); param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION);
errorList.add(param); errorList.add(param);
continue; continue;
...@@ -5082,6 +5080,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5082,6 +5080,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R} * @return {@link R}
*/ */
@Override @Override
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R urgentUpdateIsUse(String empIdcardNo) { public R urgentUpdateIsUse(String empIdcardNo) {
//员工身份证 //员工身份证
if(StringUtils.isBlank(empIdcardNo)){ if(StringUtils.isBlank(empIdcardNo)){
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
set set
REDUCE_HANDLE_STATUS = #{reduceHandleStatus}, REDUCE_HANDLE_STATUS = #{reduceHandleStatus},
REMARK = #{remark}, REMARK = #{remark},
CREATE_NAME= #{createName},
CREATE_BY = #{createBy},
CREATE_TIME = #{createTime},
UPDATE_BY = #{createBy}, UPDATE_BY = #{createBy},
UPDATE_TIME = #{createTime} UPDATE_TIME = #{createTime}
where where
......
package com.yifu.cloud.plus.v1.yifu.order.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author licancan
* @description 订单表 t_order
* @date 2022-08-26 17:20:16
*/
@Data
@TableName("t_order")
@Schema(description = "订单表")
public class TOrder implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 客户名称
*/
@Schema(description = "客户名称")
private String customerName;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String deptName;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 订单状态 0待办理 1办理中 2已办结
*/
@Schema(description = "订单状态 0待办理 1办理中 2已办结")
private Integer orderStatus;
/**
* 订单内容
*/
@Schema(description = "订单内容")
private String orderContent;
/**
* 创建人姓名(下单人)
*/
@Schema(description = "创建人姓名(下单人)")
private String createName;
/**
* 创建时间(下单时间)
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间(下单时间)")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新人
*/
@Schema(description = "更新人")
private String updateBy;
/**
* 更新人姓名
*/
@Schema(description = "更新人姓名")
private String updateName;
/**
* 更新时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除 0未删除/1删除
*/
@Schema(description = "是否删除 0未删除/1删除")
private Integer deleteFlag;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
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 com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 订单附件表 t_order_enclosure
* @date 2022-08-26 17:20:16
*/
@Data
@TableName("t_order_enclosure")
@Schema(description = "订单附件表")
public class TOrderEnclosure implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Integer id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 附件名
*/
@Schema(description = "附件名")
private String enclosureName;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 附件标识 0订单附件 1回复附件
*/
@JsonIgnore
private Integer enclosureFlag;
/**
* 附件地址
*/
@Schema(description = "附件地址")
private String enclosureAddress;
/**
* 删除标识
*/
@Schema(description = "删除标识")
private Integer deleteFlag;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.order.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author licancan
* @description 订单回复表 t_order_reply
* @date 2022-08-26 17:20:16
*/
@Data
@TableName("t_order_reply")
@Schema(description = "订单回复表")
public class TOrderReply implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Integer id;
/**
* 订单编号
*/
@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 = "创建时间(回复时间)")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 删除标识
*/
@Schema(description = "删除标识")
private Integer deleteFlag;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.yifu.cloud.plus.v1</groupId> <groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-order</artifactId> <artifactId>yifu-order-api</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
......
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.TOrderEnclosure;
import org.apache.ibatis.annotations.Mapper;
/**
* @author licancan
* @description 针对表【t_order_enclosure(订单附件表)】的数据库操作Mapper
* @date 2022-08-26 17:22:18
*/
@Mapper
public interface TOrderEnclosureMapper extends BaseMapper<TOrderEnclosure> {
}
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.TOrder;
import org.apache.ibatis.annotations.Mapper;
/**
* @author licancan
* @description 针对表【t_order(订单表)】的数据库操作Mapper
* @date 2022-08-26 17:22:18
*/
@Mapper
public interface TOrderMapper extends BaseMapper<TOrder> {
}
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.TOrderReply;
import org.apache.ibatis.annotations.Mapper;
/**
* @author licancan
* @description 针对表【t_order_reply(订单回复表)】的数据库操作Mapper
* @date 2022-08-26 17:22:18
*/
@Mapper
public interface TOrderReplyMapper extends BaseMapper<TOrderReply> {
}
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.TOrderEnclosure;
/**
* @author licancan
* @description 针对表【t_order_enclosure(订单附件表)】的数据库操作Service
* @date 2022-08-26 17:22:41
*/
public interface TOrderEnclosureService extends IService<TOrderEnclosure> {
}
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.TOrderReply;
/**
* @author licancan
* @description 针对表【t_order_reply(订单回复表)】的数据库操作Service
* @date 2022-08-26 17:22:41
*/
public interface TOrderReplyService extends IService<TOrderReply> {
}
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.TOrder;
/**
* @author licancan
* @description 针对表【t_order(订单表)】的数据库操作Service
* @date 2022-08-26 17:22:41
*/
public interface TOrderService extends IService<TOrder> {
}
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.TOrderEnclosure;
import com.yifu.cloud.plus.v1.yifu.order.mapper.TOrderEnclosureMapper;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderEnclosureService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @author licancan
* @description 针对表【t_order_enclosure(订单附件表)】的数据库操作Service实现
* @date 2022-08-26 17:22:18
*/
@Slf4j
@Service
public class TOrderEnclosureServiceImpl extends ServiceImpl<TOrderEnclosureMapper, TOrderEnclosure> implements TOrderEnclosureService {
}
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.TOrderReply;
import com.yifu.cloud.plus.v1.yifu.order.mapper.TOrderReplyMapper;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderReplyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @author licancan
* @description 针对表【t_order_reply(订单回复表)】的数据库操作Service实现
* @date 2022-08-26 17:22:18
*/
@Slf4j
@Service
public class TOrderReplyServiceImpl extends ServiceImpl<TOrderReplyMapper, TOrderReply>
implements TOrderReplyService {
}
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.TOrder;
import com.yifu.cloud.plus.v1.yifu.order.mapper.TOrderMapper;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @author licancan
* @description 针对表【t_order(订单表)】的数据库操作Service实现
* @date 2022-08-26 17:22:18
*/
@Slf4j
@Service
public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> implements TOrderService {
}
<?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.TOrderEnclosureMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.order.entity.TOrderEnclosure">
<id property="id" column="ID" jdbcType="INTEGER"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
<result property="enclosureName" column="ENCLOSURE_NAME" jdbcType="VARCHAR"/>
<result property="remark" column="REMARK" jdbcType="VARCHAR"/>
<result property="enclosureFlag" column="ENCLOSURE_FLAG" jdbcType="TINYINT"/>
<result property="enclosureAddress" column="ENCLOSURE_ADDRESS" jdbcType="VARCHAR"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
</resultMap>
<sql id="Base_Column_List">
ID,ORDER_NO,ENCLOSURE_NAME,
REMARK,ENCLOSURE_FLAG,ENCLOSURE_ADDRESS,
DELETE_FLAG
</sql>
</mapper>
<?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.TOrderMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.order.entity.TOrder">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
<result property="customerName" column="CUSTOMER_NAME" jdbcType="VARCHAR"/>
<result property="deptName" column="DEPT_NAME" jdbcType="VARCHAR"/>
<result property="deptNo" column="DEPT_NO" jdbcType="VARCHAR"/>
<result property="orderStatus" column="ORDER_STATUS" jdbcType="TINYINT"/>
<result property="orderContent" column="ORDER_CONTENT" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateName" column="UPDATE_NAME" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
</resultMap>
<sql id="Base_Column_List">
ID,ORDER_NO,CUSTOMER_NAME,
DEPT_NAME,DEPT_NO,ORDER_STATUS,
ORDER_CONTENT,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_NAME,UPDATE_TIME,
DELETE_FLAG
</sql>
</mapper>
<?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.TOrderReplyMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.order.entity.TOrderReply">
<id property="id" column="ID" jdbcType="INTEGER"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
<result property="replyContent" column="REPLY_CONTENT" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
</resultMap>
<sql id="Base_Column_List">
ID,ORDER_NO,REPLY_CONTENT,
CREATE_NAME,CREATE_TIME,DELETE_FLAG
</sql>
</mapper>
...@@ -89,14 +89,14 @@ public class TStatisticsDeclarer { ...@@ -89,14 +89,14 @@ public class TStatisticsDeclarer {
* 任职受雇从业类型 * 任职受雇从业类型
*/ */
@Length(max = 2, message = "任职受雇从业类型不能超过2个字符") @Length(max = 2, message = "任职受雇从业类型不能超过2个字符")
@ExcelIgnore @ExcelAttribute(name = "任职受雇从业类型", maxLength = 2,readConverterExp = "0=雇员,1=其他")
@ExcelProperty("任职受雇从业类型")
private String occupationType; private String occupationType;
/** /**
* 任职受雇从业日期 * 任职受雇从业日期
*/ */
@ExcelAttribute(name = "任职受雇从业日期", maxLength = 20)
@Length(max = 20, message = "任职受雇从业日期不能超过20个字符") @Length(max = 20, message = "任职受雇从业日期不能超过20个字符")
@ExcelProperty("任职受雇从业日期") @ExcelIgnore
private String occupationMonth; private String occupationMonth;
/** /**
* 本月是否申报 0 是 1 否 * 本月是否申报 0 是 1 否
......
...@@ -46,5 +46,5 @@ public interface TStatisticsDeclarerMapper extends BaseMapper<TStatisticsDeclare ...@@ -46,5 +46,5 @@ public interface TStatisticsDeclarerMapper extends BaseMapper<TStatisticsDeclare
* @Description: 统计 * @Description: 统计
* @return: * @return:
**/ **/
List<TStatisticsDeclarer> doStatisticsTaxDeclarer(@Param("nowMonth") String nowMonth, @Param("lastYear") String lastYear); List<TStatisticsDeclarer> doStatisticsTaxDeclarer(@Param("nowMonth") String nowMonth, @Param("lastMonth") String lastYear);
} }
...@@ -201,7 +201,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -201,7 +201,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (sdr != null && sdr.getData() != null) { if (sdr != null && sdr.getData() != null) {
dept = sdr.getData(); dept = sdr.getData();
} }
if (dept == null || dept.getId() == null) { if (dept != null && dept.getId() != null) {
invoiceTitle = dept.getBusinessSubjectName(); invoiceTitle = dept.getBusinessSubjectName();
} }
...@@ -273,10 +273,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -273,10 +273,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
finalSalaryNoSalary = calculationSalary(annousTax,infoVo.getAnnualBonus()); finalSalaryNoSalary = calculationSalary(annousTax,infoVo.getAnnualBonus());
//年终奖合并扣税 //年终奖合并扣税
if (isSend) { if (isSend) {
wSalary = infoVo.getAnnualBonus();
finalSalaryWithSalary = finalSalaryNoSalary; finalSalaryWithSalary = finalSalaryNoSalary;
} else { } else {
finalSalaryWithSalary = calculationSalary(annousTax, BigDecimalUtils.safeAdd(infoVo.getAnnualBonus(), wSalary = BigDecimalUtils.safeAdd(infoVo.getAnnualBonus(), infoVo.getAnnualTSalary());
infoVo.getAnnualTSalary())); finalSalaryWithSalary = calculationSalary(annousTax, wSalary);
} }
if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary). if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
...@@ -471,8 +472,12 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -471,8 +472,12 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
zySalary.add(BigDecimalUtils.safeAdd(res,anRes)); zySalary.add(BigDecimalUtils.safeAdd(res,anRes));
map.put(BigDecimalUtils.safeAdd(res,anRes).toString(),i); map.put(BigDecimalUtils.safeAdd(res,anRes).toString(),i);
} }
BigDecimal salary = BigDecimal.ZERO;
if (Common.isNotNull(zySalary)) {
salary = Collections.min(zySalary);
}
jsonObject.put("anRes",map); jsonObject.put("anRes",map);
jsonObject.put("zySalary",Collections.max(zySalary)); jsonObject.put("zySalary",salary);
return jsonObject; return jsonObject;
} }
......
...@@ -173,8 +173,7 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla ...@@ -173,8 +173,7 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
return R.failed("上月数据已生成,不可重复生成!"); return R.failed("上月数据已生成,不可重复生成!");
} else { } else {
String lastMonth = DateUtil.addMonth(-1); //上月 String lastMonth = DateUtil.addMonth(-1); //上月
String lastYear = lastMonth.substring(0,4); List<TStatisticsDeclarer> stdvoList = baseMapper.doStatisticsTaxDeclarer(nowMonth,lastMonth);
List<TStatisticsDeclarer> stdvoList = baseMapper.doStatisticsTaxDeclarer(nowMonth,lastYear);
for (TStatisticsDeclarer declarer : stdvoList) { for (TStatisticsDeclarer declarer : stdvoList) {
this.save(declarer); this.save(declarer);
} }
......
...@@ -95,12 +95,15 @@ ...@@ -95,12 +95,15 @@
<!--统计--> <!--统计-->
<select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap"> <select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap">
select SELECT
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.INVOICE_TITLE DECLARE_UNIT, #{nowMonth} DECLARE_MONTH,c.EMP_NAME,c.EMP_IDCARD,c.EMP_PHONE,c.INVOICE_TITLE DECLARE_UNIT,
if(a.FORM_TYPE=0,'0',if(a.FORM_TYPE=3 or a.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE if(c.FORM_TYPE=0,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE FROM
from t_salary_account a (SELECT s.* FROM t_salary_account s,
left join t_salary_employee b on b.id = a.EMP_ID (SELECT a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.INVOICE_TITLE,a.FORM_TYPE,MAX(CREATE_TIME) max_day,a.SETTLEMENT_MONTH
where a.DELETE_FLAG = '0' and a.SETTLEMENT_MONTH like '${lastYear}%' FROM t_salary_account a WHERE a.DELETE_FLAG = '0' AND a.SETTLEMENT_MONTH = #{lastYear}
GROUP BY a.EMP_IDCARD,OCCUPATION_TYPE,DECLARE_UNIT,a.SETTLEMENT_MONTH GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,a.FORM_TYPE,a.SETTLEMENT_MONTH) b
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH AND s.FORM_TYPE = b.FORM_TYPE ) c
</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