Commit 1af2f137 authored by fangxinjiang's avatar fangxinjiang

地市优化 & 社保派单兼容订单编码

parent fd5b7b0c
......@@ -91,7 +91,7 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
if (res > CommonConstants.ZERO_INT){
return R.failed("已存在对应区域在用的配置信息");
}
baseMapper.updateById(entity);
baseMapper.updateById(tMinSalary);
return R.ok(true,CommonConstants.UPDATE_SUCCESS);
}else {
return R.failed(false,CommonConstants.SAVE_FAILED);
......
......@@ -582,5 +582,12 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("首次购买时间(第一派单月份)" )
private Date firstBuyMonthSocial;
/**
* 订单ID
*/
@ExcelAttribute(name = "订单ID")
@Schema(description = "订单ID" )
@ExcelProperty("订单ID" )
private String orderId;
}
......@@ -445,4 +445,9 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
@ExcelProperty("派单ID" )
private String dispatchId;
/**
* 订单ID
*/
private String orderId;
}
......@@ -224,8 +224,8 @@ public class TDispatchInfoController {
@SysLog("批量新增派单信息记录表")
@PostMapping("/importListAdd")
//@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file){
return tDispatchInfoService.importDiy(file.getInputStream());
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file, String orderId){
return tDispatchInfoService.importDiy(file.getInputStream(),orderId);
}
/**
......
......@@ -46,7 +46,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
*/
IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
R<List<ErrorMessage>> importDiy(InputStream inputStream, String orderId);
void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
......@@ -56,7 +56,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
@ShardingTransactionType(TransactionType.BASE)
void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList,
YifuUser user);
YifuUser user, String orderId);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream);
......
......@@ -236,7 +236,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
@Override
public R<List<ErrorMessage>> importDiy(InputStream inputStream) {
public R<List<ErrorMessage>> importDiy(InputStream inputStream, String orderId) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
R.failed(CommonConstants.USER_FAIL);
......@@ -284,7 +284,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTDispatchInfo(cachedDataList, errorMessageList,user);
importTDispatchInfo(cachedDataList, errorMessageList,user,orderId);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -299,7 +299,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@ShardingTransactionType(TransactionType.BASE)
public void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList,
YifuUser user) {
YifuUser user, String orderId) {
if (!Common.isNotNull(excelVOList)){
return;
}
......@@ -432,6 +432,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue;
}
// 新增派单信息
excel.setOrderId(orderId);
initDispatchAddInfo(user, dispatchMap, empVo, socialSet, fundSet, excel,socialFund,injury);
// 变更社保公积金查询
initSocialFundAddInfo(socialFundAddMap, empVo, socialSet, fundSet, setInfoVo, socialFund, excel);
......@@ -1002,6 +1003,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TSocialFundInfo socialFund, boolean injury) {
TDispatchInfo dispatch = new TDispatchInfo();
// 初始化派单项
dispatch.setOrderId(excel.getOrderId());
initAddHandleItem(excel, socialFund,dispatch,socialSet,injury);
dispatch.setOrganName(user.getDeptName());
dispatch.setCreateBy(user.getId());
......
......@@ -24,7 +24,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.*;
......@@ -41,7 +40,6 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.RequiredArgsConstructor;
import org.checkerframework.checker.units.qual.C;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -383,7 +381,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
// 档案地市没问题 开始派单处理
if (errorMessageList.size() == CommonConstants.ZERO_INT) {
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user);
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null);
}
// 处理派增结果
errorMessage = handleDispatchAddRes(preInfo, errorMessageList);
......@@ -2453,7 +2451,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
// 档案地市没问题 开始派单处理
if (!Common.isNotNull(errorMessageList)){
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user);
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null);
}
// 处理派增结果
handleDispatchAddRes(pre, errorMessageList);
......
......@@ -94,7 +94,9 @@
<result property="idCardTown" column="ID_CARD_TOWN"/>
<result property="idCardAddress" column="ID_CARD_ADDRESS"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="orderId" column="ORDER_ID"/>
</resultMap>
<resultMap id="dispatchPageMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPageVo" extends="tDispatchInfoMap">
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
......@@ -213,7 +215,8 @@
a.ID_CARD_CITY,
a.ID_CARD_TOWN,
a.ID_CARD_ADDRESS,
a.APPLY_NO
a.APPLY_NO,
a.ORDER_ID
</sql>
<sql id="tDispatchInfo_where">
<if test="tDispatchInfo != null">
......
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