Merge branch 'release/2.15.2.2409.01' into release/个税版本
# Conflicts: # src/com/engine/salary/sys/service/impl/SalarySysConfServiceImpl.java
This commit is contained in:
commit
b89b068a1a
|
|
@ -84,4 +84,6 @@ public interface VariableArchiveItemMapper {
|
|||
void deleteByIds(@Param("collection")List<Long> part);
|
||||
|
||||
void deleteByArchiveIds(@Param("collection")List<Long> part);
|
||||
|
||||
void updateBatchSelective(@Param("list")List<VariableArchiveItemPO> variableArchiveItemPOS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,6 +312,22 @@
|
|||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
<update id="updateBatchSelective">
|
||||
update hrsa_variable_archive_item
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="item_value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.itemValue != null">
|
||||
when id = #{item.id} then #{item.itemValue}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
</if>
|
||||
<!-- 工号 -->
|
||||
<if test="param.workcode != null and param.workcode != ''">
|
||||
AND e.workcode like '%'+#{workcode}+'%'
|
||||
AND e.workcode like '%'+#{param.workcode}+'%'
|
||||
</if>
|
||||
<!-- 部门 -->
|
||||
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@
|
|||
AND payment_organization = #{paymentOrganization}
|
||||
AND fund_scheme_id is not null
|
||||
AND fund_start_time is not null AND fund_start_time <![CDATA[ <= ]]> #{billMonth}
|
||||
AND (fund_end_time is null OR fund_end_time <![CDATA[ >= ]]> #{billMonth})
|
||||
AND (fund_end_time is null OR fund_end_time <![CDATA[ >= ]]> #{billMonth} OR fund_end_time ='')
|
||||
</select>
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@
|
|||
AND payment_organization = #{paymentOrganization}
|
||||
AND other_scheme_id is not null
|
||||
AND other_start_time is not null AND other_start_time <![CDATA[ <= ]]> #{billMonth}
|
||||
AND (other_end_time is null OR other_end_time <![CDATA[ >= ]]> #{billMonth})
|
||||
AND (other_end_time is null OR other_end_time <![CDATA[ >= ]]> #{billMonth} OR other_end_time ='')
|
||||
</select>
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@
|
|||
AND payment_organization = #{paymentOrganization}
|
||||
AND social_scheme_id is not null
|
||||
AND social_start_time is not null AND social_start_time <![CDATA[ <= ]]> #{billMonth}
|
||||
AND (social_end_time is null OR social_end_time <![CDATA[ >= ]]> #{billMonth})
|
||||
AND (social_end_time is null OR social_end_time <![CDATA[ >= ]]> #{billMonth} OR social_end_time ='')
|
||||
</select>
|
||||
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface VariableArchiveItemService {
|
||||
|
||||
List<VariableArchiveItemPO> listAll();
|
||||
/**
|
||||
* 根据浮动薪资档案id获取
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1125,7 +1125,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// List<Map<String, Object>> data = ExcelParseHelper.parse2Map(sheet, 1);
|
||||
List<Map<String, Object>> data;
|
||||
// if (StringUtils.equals("importSalaryAcctResult", importType)) {
|
||||
data = ExcelParseHelper.parse2Map(workbook, 0, 2, 1);
|
||||
data = ExcelParseHelper.parse2Map(sheet, 2, 1);
|
||||
// } else {
|
||||
// data = ExcelParseHelper.parse2Map(sheet, 1);
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ public class VariableArchiveItemServiceImpl extends Service implements VariableA
|
|||
return MapperProxyFactory.getProxy(VariableArchiveItemMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VariableArchiveItemPO> listAll() {
|
||||
return getVariableArchiveItemMapper().listAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据浮动薪资档案id获取
|
||||
*
|
||||
|
|
|
|||
|
|
@ -206,9 +206,7 @@ public class VariableArchiveServiceImpl extends Service implements VariableArchi
|
|||
|
||||
List<VariableArchivePO> variableArchivePOList = getVariableArchiveMapper().listSome(VariableArchivePO.builder().salaryMonth(saveParam.getSalaryMonthDate()).taxAgentId(saveParam.getTaxAgentIds()).employeeId(saveParam.getEmployeeId()).build());
|
||||
if (CollectionUtils.isNotEmpty(variableArchivePOList)) {
|
||||
// 先删除原有档案
|
||||
List<Long> variableArchiveIds = variableArchivePOList.stream().map(VariableArchivePO::getId).collect(Collectors.toList());
|
||||
getVariableArchiveMapper().deleteByIds(variableArchiveIds);
|
||||
throw new SalaryRunTimeException("已存在浮动薪酬数据");
|
||||
}
|
||||
|
||||
// 保存浮动薪资档案信息
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.engine.salary.entity.datacollection.AddUpDeduction;
|
|||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.engine.salary.entity.datacollection.po.SpecialAddDeductionPO;
|
||||
import com.engine.salary.entity.datacollection.po.VariableArchiveItemPO;
|
||||
import com.engine.salary.entity.salaryacct.po.ExcelAcctResultPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
||||
|
|
@ -25,10 +26,7 @@ import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationDetailPO;
|
|||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationValuePO;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.archive.SalaryArchiveItemMapper;
|
||||
import com.engine.salary.mapper.datacollection.AddUpDeductionMapper;
|
||||
import com.engine.salary.mapper.datacollection.AddUpSituationMapper;
|
||||
import com.engine.salary.mapper.datacollection.OtherDeductionMapper;
|
||||
import com.engine.salary.mapper.datacollection.SpecialAddDeductionMapper;
|
||||
import com.engine.salary.mapper.datacollection.*;
|
||||
import com.engine.salary.mapper.salaryacct.ExcelAcctResultMapper;
|
||||
import com.engine.salary.mapper.salaryacct.SalaryAcctResultMapper;
|
||||
import com.engine.salary.mapper.siaccount.ExcelInsuranceDetailMapper;
|
||||
|
|
@ -41,6 +39,8 @@ import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
|||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclarationDetailMapper;
|
||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclarationValueMapper;
|
||||
import com.engine.salary.service.VariableArchiveItemService;
|
||||
import com.engine.salary.service.impl.VariableArchiveItemServiceImpl;
|
||||
import com.engine.salary.sys.config.SysConfig;
|
||||
import com.engine.salary.sys.constant.SalarySysConstant;
|
||||
import com.engine.salary.sys.entity.param.AppSettingSaveParam;
|
||||
|
|
@ -163,6 +163,9 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
return MapperProxyFactory.getProxy(TaxDeclarationValueMapper.class);
|
||||
}
|
||||
|
||||
private VariableArchiveItemService getVariableArchiveItemService(User user) {
|
||||
return ServiceUtil.getService(VariableArchiveItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作是否需要申报功能
|
||||
|
|
@ -1272,15 +1275,42 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
return 1;
|
||||
});
|
||||
|
||||
Future<Integer> submit16 = fixedThreadPool.submit(() -> {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
List<VariableArchiveItemPO> variableArchiveItemPOS = getVariableArchiveItemService(user).listAll();
|
||||
if (CollectionUtils.isNotEmpty(variableArchiveItemPOS)) {
|
||||
variableArchiveItemPOS.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setItemValue(AESEncryptUtil.closeEncryptSetting(po.getItemValue(), sysConfPo));
|
||||
} else {
|
||||
po.setItemValue(AESEncryptUtil.encrypt(po.getItemValue()));
|
||||
}
|
||||
});
|
||||
List<List<VariableArchiveItemPO>> partition = Lists.partition(variableArchiveItemPOS, 10);
|
||||
VariableArchiveItemMapper mapper = sqlSession.getMapper(VariableArchiveItemMapper.class);
|
||||
partition.forEach(mapper::updateBatchSelective);
|
||||
sqlSession.commit();
|
||||
log.info("finish hrsa_variable_archive_item");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
sqlSession.rollback();
|
||||
log.error("fail hrsa_variable_archive_item", e);
|
||||
return 0;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
|
||||
int flag = submit.get() + submit1.get() + submit2.get() + submit3.get() + submit4.get() + submit5.get() + submit6.get() + submit7.get() + submit8.get() + submit9.get() + submit10.get() + submit11.get() + submit12.get() + submit13.get() + submit14.get()+ submit15.get();
|
||||
if (flag == 16) {
|
||||
int flag = submit.get() + submit1.get() + submit2.get() + submit3.get() + submit4.get() + submit5.get() + submit6.get() + submit7.get() + submit8.get() + submit9.get() + submit10.get() + submit11.get() + submit12.get() + submit13.get() + submit14.get()+ submit15.get()+ submit16.get();
|
||||
if (flag == 17) {
|
||||
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "success", 30);
|
||||
} else {
|
||||
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "fail", 30);
|
||||
}
|
||||
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
||||
return flag == 16;
|
||||
return flag == 17;
|
||||
} catch (Exception e) {
|
||||
Util_DataCache.setObjVal(ENCRYPT_IN_PROGRESS + progressId, "fail", 30);
|
||||
Util_DataCache.clearVal(AES_ENCRYPT_IN_PROGRESS);
|
||||
|
|
|
|||
Loading…
Reference in New Issue