Commit 648c37cc authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents 44599706 2b842ea6
......@@ -88,6 +88,7 @@ public class EKPUtil {
TInsuranceSettlePushParam pushParam = insuranceDetail2PushParam(param);
try{
String formValues = new ObjectMapper().writeValueAsString(pushParam);
log.info("formValues:"+formValues);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
......@@ -104,7 +105,7 @@ public class EKPUtil {
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm.add("formValues", formValues);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System.out.println("wholeForm:"+wholeForm);
//System.out.println("wholeForm:"+wholeForm);
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
......
......@@ -2,9 +2,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.config.MybatisPlusMetaObjectHandler;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.plugins.YifuPaginationInnerInterceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.SqlSessionTemplate;
......@@ -101,7 +104,7 @@ public class EkpDataSourceConfig {
@Bean
public MybatisPlusInterceptor ekpPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
interceptor.addInnerInterceptor(new YifuPaginationInnerInterceptor());
return interceptor;
}
}
......@@ -2,9 +2,13 @@ package com.yifu.cloud.plus.v1.yifu.insurances.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.core.config.GlobalConfig;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.config.MybatisPlusMetaObjectHandler;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.plugins.YifuPaginationInnerInterceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
......@@ -38,19 +42,29 @@ public class InsurancesDataSourceConfig {
}
@Bean
public SqlSessionFactory insurancesSqlSessionFactory(@Qualifier("insurancesDataSource") DataSource dataSource) throws Exception {
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
//多数据源 myMetaObjectHandler不起作用问题解决
GlobalConfig globalConfig = new GlobalConfig();
globalConfig.setMetaObjectHandler(new MybatisPlusMetaObjectHandler());
globalConfig.setDbConfig(new GlobalConfig.DbConfig());
globalConfig.setBanner(false);
bean.setGlobalConfig(globalConfig);
//添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
try {
bean.setMapperLocations(resolver.getResources("classpath:mapper/insurances/*.xml"));
//分页插件配置,不配置分页插件无效,否则会出现total为0的情况
bean.setPlugins(insurancesPlusInterceptor());
return bean.getObject();
SqlSessionFactory sqlSessionFactory = bean.getObject();
sqlSessionFactory.getConfiguration().setMapUnderscoreToCamelCase(true);
return sqlSessionFactory;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
/* MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
MybatisConfiguration configuration = new MybatisConfiguration();
......@@ -61,8 +75,9 @@ public class InsurancesDataSourceConfig {
}
@Bean
public DataSourceTransactionManager insurancesTransactionManager(@Qualifier("insurancesDataSource") DataSource dataSource) {
@Bean(name = "insurancesTransactionManager")
@Primary
public DataSourceTransactionManager insurancesTransactionManager(@Qualifier("insurancesDataSource") DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}
@Bean
......@@ -77,7 +92,7 @@ public class InsurancesDataSourceConfig {
@Bean
public MybatisPlusInterceptor insurancesPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
interceptor.addInnerInterceptor(new YifuPaginationInnerInterceptor());
return interceptor;
}
}
......@@ -2748,9 +2748,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param displayFlag 是否显示 0不显示/1显示
* @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)){
try {
List<TInsuranceOperate> operateList = new ArrayList<>();
for (TInsuranceDetail detail : detailList) {
TInsuranceOperate operate = new TInsuranceOperate();
......@@ -2764,9 +2764,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operateList.add(operate);
}
tInsuranceOperateService.saveBatch(operateList);
}catch (Exception e){
e.getStackTrace();
}
}
}
......@@ -2779,7 +2776,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param operateDesc 操作描述
* @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)){
try {
List<TInsuranceOperate> operateList = new ArrayList<>();
......@@ -3102,7 +3100,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< RefundExportListVo >}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(RefundExportListParam param){
YifuUser user = SecurityUtils.getUser();
List<RefundExportListVo> refundExportList;
......@@ -3175,7 +3173,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail) {
Integer refundType = insuranceDetail.getRefundType();
if(CommonConstants.THREE_INT != refundType && CommonConstants.FOUR_INT != refundType){
......@@ -3252,7 +3250,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @return void
*/
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
@Override
public R insuranceRefundImport(List<InsuranceHandleImportParam> insuranceRefundImportList) {
YifuUser user = SecurityUtils.getUser();
......@@ -3309,7 +3307,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @return void
*/
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
@Override
public R settleMonthChange(List<SettleMonthChangeCheckParam> settleMonthCheckList) {
//初始化线程池
......@@ -3388,7 +3386,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R deptChange(List<DeptChangeCheckParam> deptChangeCheckList) {
//初始化线程池
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(50, 50, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10));
......@@ -3965,7 +3963,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R updateIsUse(String id) {
YifuUser user = SecurityUtils.getUser();
TInsuranceDetail insuranceDetail = getById(id);
......@@ -4640,7 +4638,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//查数据是否存在权限范围内
String regionSQL = getRegionSQL(user);
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);
errorList.add(param);
continue;
......
......@@ -58,6 +58,21 @@ public class TSalaryStandardController {
private final TApprovalRecordService auditLogService;
/**
* 简单分页查询-申请
*
* @param page 分页对象
* @param tSalaryStandard 标准薪酬工资表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/pageApply")
public R<IPage<TSalaryStandard>> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) {
tSalaryStandard.setDeleteFlag(CommonConstants.ZERO_INT);
return new R<>(tSalaryStandardService.getTSalaryStandardPageApply(page, tSalaryStandard));
}
/**
* 简单分页查询
*
......
......@@ -43,6 +43,7 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
*/
IPage<TSalaryStandard> getTSalaryStandardPage(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard);
IPage<TSalaryStandard> getTSalaryStandardPageApply(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard);
/**
* 标准薪酬工资表审核页面简单分页查询
* @param tSalaryStandard 标准薪酬工资表
......@@ -53,4 +54,5 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
List<TSalaryStandardExportVo> getSalaryStandardExport(@Param("searchVo") TSalaryStandardSearchVo searchVo, @Param("idList")List<String> idList);
int getSalaryStandardExportCount(@Param("searchVo") TSalaryStandardSearchVo searchVo, @Param("idList")List<String> idList);
}
......@@ -74,4 +74,5 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/
R<String> deleteSalaryById(String id);
IPage<TSalaryStandard> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard);
}
......@@ -84,6 +84,17 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Autowired
private DaprSocialProperties socialProperties;
/**
* 标准薪酬工资表简单分页查询
*
* @param tSalaryStandard 标准薪酬工资表
* @return
*/
@Override
public IPage<TSalaryStandard> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) {
return baseMapper.getTSalaryStandardPageApply(page, tSalaryStandard);
}
/**
* 标准薪酬工资表简单分页查询
*
......
......@@ -19,6 +19,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Author fxj
......@@ -128,7 +129,10 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
if (Common.isEmpty(declareTitle)) {
return R.failed("申报单位不能为空");
}
List<String> uc = sdsList.stream().map(TSpecialDeducationSum::getDeclareTitle).collect(Collectors.toList());
if (Common.isNotNull(uc) && uc.size() > CommonConstants.ONE_INT){
return R.failed("一次只允许导入一个申报单位");
}
TSpecialDeducationSum sdsCheck = new TSpecialDeducationSum();
sdsCheck.setCreateMonth(yearMonth);
sdsCheck.setDeclareTitle(declareTitle);
......
......@@ -20,6 +20,8 @@
<result property="type" column="TYPE"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="customerName" column="CUSTOMER_NAME"/>
<result property="reasonType" column="REASON_TYPE"/>
<result property="feedBack" column="FEED_BACK"/>
</resultMap>
<resultMap id="sysMessageSalaryExportMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryExportVo">
<result property="actualSalary" column="actual_salary"/>
......@@ -119,8 +121,7 @@
<!--sysMessageSalary简单分页查询-->
<select id="getSysMessageSalaryPage" resultMap="sysMessageSalaryMap">
SELECT
<include refid="Base_Column_List"/>,
b.*
<include refid="Base_Column_List"/>
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
......
......@@ -94,7 +94,8 @@
a.SETTLEMENT_ORGAN_NAME,
a.month,
a.relay_salary,
a.CREATE_NAME
a.CREATE_NAME,
a.feed_back,a.reason_type
FROM t_have_salary_nosocial a
<include refid="querPage"/>
</select>
......
......@@ -265,6 +265,18 @@
</where>
ORDER BY a.CREATE_TIME desc
</select>
<!--tSalaryStandard简单分页查询-->
<select id="getTSalaryStandardPageApply" resultMap="tSalaryStandardMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_standard a
<where>
a.DELETE_FLAG = 0
<!-- 薪资是否可查看 0 是 1否-->
<include refid="tSalaryStandard_where"/>
</where>
ORDER BY a.CREATE_TIME desc
</select>
<!--tSalaryStandard简单分页查询-->
<select id="getTSalaryStandardAuditPage" resultMap="tSalaryStandardMap">
SELECT
......
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