Commit bcf7d080 authored by huyuchen's avatar huyuchen

预派单 代码修改

parent 6a2f2440
...@@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,7 +21,6 @@ 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.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDict; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDict;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
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.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
...@@ -34,7 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService; ...@@ -34,7 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchExportVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchUpdateVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchUpdateVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.ehcache.impl.internal.util.ServiceUtil;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityRequirement;
...@@ -43,7 +41,6 @@ import lombok.RequiredArgsConstructor; ...@@ -43,7 +41,6 @@ import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -221,7 +218,7 @@ public class TPreDispatchInfoController { ...@@ -221,7 +218,7 @@ public class TPreDispatchInfoController {
* @Author huyc * @Author huyc
* @Date 2022-07-18 * @Date 2022-07-18
* @param jsonString * @param jsonString
* @param houseId 社保户ID * @param socialHouse 社保户
* @param departId 结算主体ID * @param departId 结算主体ID
* @return * @return
**/ **/
...@@ -229,9 +226,8 @@ public class TPreDispatchInfoController { ...@@ -229,9 +226,8 @@ public class TPreDispatchInfoController {
@SysLog("预派单批量新增派增") @SysLog("预派单批量新增派增")
@PostMapping("/analysisJsonStringImportAdd") @PostMapping("/analysisJsonStringImportAdd")
@PreAuthorize("@pms.hasPermission('social:tpredispatchinfo_importAddList')") @PreAuthorize("@pms.hasPermission('social:tpredispatchinfo_importAddList')")
public R analysisJsonStringImportAdd(@RequestBody String jsonString, public R analysisJsonStringImportAdd(@RequestBody String jsonString, @RequestParam(value = "socialHouse",required = false) String socialHouse,
@RequestParam(value = "houseId",required = true) String houseId, @RequestParam(value = "fundHouse",required = false) String fundHouse, @RequestParam String departId) {
@RequestParam(value = "departId",required = true) String departId) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL); return R.failed(CommonConstants.USER_FAIL);
...@@ -248,7 +244,7 @@ public class TPreDispatchInfoController { ...@@ -248,7 +244,7 @@ public class TPreDispatchInfoController {
return R.failed(util1.getErrorInfo(),PreDispatchConstants.DATA_CHECK); return R.failed(util1.getErrorInfo(),PreDispatchConstants.DATA_CHECK);
} else { } else {
if (null != listInfo && !listInfo.isEmpty()) { if (null != listInfo && !listInfo.isEmpty()) {
errorInfo = tPreDispatchInfoService.batchSavePreDisPatchAdd(listInfo, user,houseId,departId); errorInfo = tPreDispatchInfoService.batchSavePreDisPatchAdd(listInfo, user,socialHouse,fundHouse,departId);
} else { } else {
errorInfo.add(new ErrorMessage(null, CommonConstants.DATA_CAN_NOT_EMPTY)); errorInfo.add(new ErrorMessage(null, CommonConstants.DATA_CAN_NOT_EMPTY));
} }
......
...@@ -104,11 +104,11 @@ public interface TPreDispatchInfoService extends IService<TPreDispatchInfo> { ...@@ -104,11 +104,11 @@ public interface TPreDispatchInfoService extends IService<TPreDispatchInfo> {
* @Date 2022-07-18 * @Date 2022-07-18
* @param listInfo * @param listInfo
* @param user * @param user
* @param houseId * @param socialHouse
* @param departId * @param departId
* @return * @return
**/ **/
List<ErrorMessage> batchSavePreDisPatchAdd(List<TPreDispatchInfo> listInfo, YifuUser user, String houseId, String departId); List<ErrorMessage> batchSavePreDisPatchAdd(List<TPreDispatchInfo> listInfo, YifuUser user, String socialHouse, String fundHouse, String departId);
/** /**
* 预派单批量新增派减 * 预派单批量新增派减
......
...@@ -546,7 +546,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -546,7 +546,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
} }
@Override @Override
public List<ErrorMessage> batchSavePreDisPatchAdd(List<TPreDispatchInfo> listInfo, YifuUser user, String houseId, String departId) { public List<ErrorMessage> batchSavePreDisPatchAdd(List<TPreDispatchInfo> listInfo, YifuUser user, String socialHouse, String fundHouse, String departId) {
List<ErrorMessage> errorList = new ArrayList<>(); List<ErrorMessage> errorList = new ArrayList<>();
R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(departId); R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(departId);
TSettleDomainSelectVo selectVo = domainR.getData(); TSettleDomainSelectVo selectVo = domainR.getData();
...@@ -579,7 +579,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -579,7 +579,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
continue; continue;
} }
// 基础封装 其他 // 基础封装 其他
initBaseInfo(houseId, selectVo, info); initBaseInfo(socialHouse, fundHouse, selectVo, info);
// 2.先校验已有数据 // 2.先校验已有数据
checkBatchSave(info, CommonConstants.ZERO_STRING); checkBatchSave(info, CommonConstants.ZERO_STRING);
// 3.封装 社保缴纳地 公积金缴纳地 // 3.封装 社保缴纳地 公积金缴纳地
...@@ -1026,15 +1026,14 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1026,15 +1026,14 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
/** /**
* 初始化基础数据 如 各种状态 合同数据等 * 初始化基础数据 如 各种状态 合同数据等
* * @param socialHouse
* @param houseId
* @param selectVo * @param selectVo
* @param info * @param info
* @return * @return
* @Author fxj * @Author fxj
* @Date 2020-12-31 * @Date 2020-12-31
**/ **/
private void initBaseInfo(String houseId, TSettleDomainSelectVo selectVo, TPreDispatchInfo info) { private void initBaseInfo(String socialHouse, String fundHouse, TSettleDomainSelectVo selectVo, TPreDispatchInfo info) {
info.setType(CommonConstants.ZERO_STRING); info.setType(CommonConstants.ZERO_STRING);
info.setDataSubStatus(CommonConstants.ONE_STRING); info.setDataSubStatus(CommonConstants.ONE_STRING);
info.setStatus(CommonConstants.ZERO_STRING); info.setStatus(CommonConstants.ZERO_STRING);
...@@ -1056,8 +1055,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1056,8 +1055,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
info.setContractTermAdd(Integer.toString(Common.getYearOfTime(info.getContractStart(), info.getContractEnd()))); info.setContractTermAdd(Integer.toString(Common.getYearOfTime(info.getContractStart(), info.getContractEnd())));
// 默认工时制 综合工时制2 // 默认工时制 综合工时制2
info.setWorkingHoursAdd(CommonConstants.TWO_STRING); info.setWorkingHoursAdd(CommonConstants.TWO_STRING);
info.setSocialHouseAdd(houseId); info.setSocialHouseAdd(socialHouse);
info.setFundHouseAdd(houseId); info.setFundHouseAdd(fundHouse);
} }
/** /**
......
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