Commit 845e324f authored by hongguangwu's avatar hongguangwu

MVP1.6.5-社保士兵实缴-复核

parent dda86e09
...@@ -161,12 +161,12 @@ public class TAutoPaymentDetail extends BaseEntity { ...@@ -161,12 +161,12 @@ public class TAutoPaymentDetail extends BaseEntity {
@Schema(description = "社保户") @Schema(description = "社保户")
private String socialSecurityAccount; private String socialSecurityAccount;
/** /**
* 资源类型:1日常申报导出;2人员缴费明细打印;3单位缴费明细查询 * 资源类型:1日常申报导出;2人员缴费明细打印;3单位缴费明细查询;4单位缴费明细下载
*/ */
@ExcelAttribute(name = "资源类型", maxLength = 100) @ExcelAttribute(name = "资源类型", maxLength = 100)
@Length(max = 100, message = "资源类型不能超过100个字符") @Length(max = 100, message = "资源类型不能超过100个字符")
@ExcelProperty("资源类型") @ExcelProperty("资源类型")
@Schema(description = "资源类型:1日常申报导出;2人员缴费明细打印;3单位缴费明细查询") @Schema(description = "资源类型:1日常申报导出;2人员缴费明细打印;3单位缴费明细查询;4单位缴费明细下载")
private String sourceType; private String sourceType;
/** /**
......
...@@ -61,11 +61,11 @@ public class TSocialSoldierShenBaoTask extends BaseEntity { ...@@ -61,11 +61,11 @@ public class TSocialSoldierShenBaoTask extends BaseEntity {
/** /**
* 1申报;2调整 * 1申报;2调整
*/ */
@ExcelAttribute(name = "1申报;2调整", isNotEmpty = true, errorInfo = "1申报;2调整", maxLength = 1) @ExcelAttribute(name = "1申报;2调整", isNotEmpty = true, errorInfo = "1申报;2调整", maxLength = 2)
@NotBlank(message = "1申报;2调整不能为空") @NotBlank(message = "1申报;2调整不能为空")
@Length(max = 1, message = "1申报;2调整不能超过1个字符") @Length(max = 2, message = "1申报;2调整不能超过1个字符")
@ExcelProperty("1申报;2调整") @ExcelProperty("1申报;2调整")
@Schema(description = "1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询") @Schema(description = "1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询;6:实缴3单位缴费明细下载")
private String type; private String type;
/** /**
* 拉取状态:0未拉取;1已拉取 * 拉取状态:0未拉取;1已拉取
......
...@@ -14,12 +14,23 @@ import java.io.Serializable; ...@@ -14,12 +14,23 @@ import java.io.Serializable;
public class SocialSoldierPaymentSelectTwoVo implements Serializable { public class SocialSoldierPaymentSelectTwoVo implements Serializable {
// 企业名称 参险类型 业务年月 回传信息 回传信息1 回传信息2 // 企业名称 参险类型 业务年月 回传信息 回传信息1 回传信息2
// 2024-6-7 11:29:15 变模版:
// 企业名称 证件号码 姓名 险种类型 人员状态 开始日期 结束日期 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称") @ExcelProperty("企业名称")
private String companyName; private String companyName;
@ExcelProperty("参险类型") @ExcelProperty("证件号码")
private String idCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("险种类型")
private String paymentType; private String paymentType;
@ExcelProperty("业务年月") @ExcelProperty("人员状态")
private String payMonth; private String userStatus;
@ExcelProperty("开始日期")
private String startDate;
@ExcelProperty("结束日期")
private String endDate;
@ExcelProperty("回传信息") @ExcelProperty("回传信息")
private String returnInfo; private String returnInfo;
@ExcelProperty("回传信息1") @ExcelProperty("回传信息1")
......
...@@ -152,7 +152,7 @@ public class TSocialSoldierController { ...@@ -152,7 +152,7 @@ public class TSocialSoldierController {
@SysLog("6每月6号推送实缴3张表查询") @SysLog("6每月6号推送实缴3张表查询")
@Inner @Inner
public R<String> pushPaymentThree() { public R<String> pushPaymentThree() {
return tSocialSoldierPushService.pushPaymentThree(); return tSocialSoldierPushService.pushPaymentThree(null,false);
} }
/** /**
...@@ -169,4 +169,29 @@ public class TSocialSoldierController { ...@@ -169,4 +169,29 @@ public class TSocialSoldierController {
return tSocialSoldierService.doInnerGetPaymentThree(); return tSocialSoldierService.doInnerGetPaymentThree();
} }
/**
* @Description: 推送重新办理任务
* @Author: hgw
* @Date: 2024/5/11 19:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "推送重新办理任务")
@GetMapping("/pushReHandle")
public R<String> pushReHandle(@RequestParam String parentId) {
return tSocialSoldierPushService.pushPaymentThree(parentId, true);
}
/**
* @param parentId 主表id
* @Description: 获取重新办理结果
* @Author: hgw
* @Date: 2024/5/11 19:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "获取重新办理结果")
@GetMapping("/getReHandle")
public R<String> getReHandle(@RequestParam String parentId) {
return tSocialSoldierService.getReHandle(parentId);
}
} }
...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail; ...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 自动化实缴记录表 * 自动化实缴记录表
* *
...@@ -49,4 +51,6 @@ public interface TAutoPaymentDetailMapper extends BaseMapper<TAutoPaymentDetail> ...@@ -49,4 +51,6 @@ public interface TAutoPaymentDetailMapper extends BaseMapper<TAutoPaymentDetail>
**/ **/
void deleteByParentId(@Param("parentId") String parentId); void deleteByParentId(@Param("parentId") String parentId);
List<TAutoPaymentDetail> getListByParentId(@Param("parentId") String parentId);
} }
...@@ -39,4 +39,7 @@ public interface TAutoPaymentErrorMapper extends BaseMapper<TAutoPaymentError> { ...@@ -39,4 +39,7 @@ public interface TAutoPaymentErrorMapper extends BaseMapper<TAutoPaymentError> {
* @return * @return
*/ */
IPage<TAutoPaymentError> getTAutoPaymentErrorPage(Page<TAutoPaymentError> page, @Param("tAutoPaymentError") TAutoPaymentError tAutoPaymentError); IPage<TAutoPaymentError> getTAutoPaymentErrorPage(Page<TAutoPaymentError> page, @Param("tAutoPaymentError") TAutoPaymentError tAutoPaymentError);
void deleteByParentId(@Param("parentId") String parentId);
} }
...@@ -48,4 +48,6 @@ public interface TAutoPaymentInfoMapper extends BaseMapper<TAutoPaymentInfo> { ...@@ -48,4 +48,6 @@ public interface TAutoPaymentInfoMapper extends BaseMapper<TAutoPaymentInfo> {
**/ **/
TAutoPaymentInfo getThisMonthMainAuto(); TAutoPaymentInfo getThisMonthMainAuto();
void setUrlToNullByRePayment(@Param("parentId") String parentId);
} }
...@@ -117,7 +117,9 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> { ...@@ -117,7 +117,9 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
List<SocialSoldierPaymentSelectThreeVo> getSoldierPaymentSelectThreeList(); List<SocialSoldierPaymentSelectThreeVo> getSoldierPaymentSelectThreeList();
void getSoldierPaymentErrorInfoOne(@Param("parentId") String parentId); void getSoldierPaymentErrorInfoOne(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwo(@Param("parentId") String parentId); void getSoldierPaymentErrorInfoTwo(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOneByRe(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwoByRe(@Param("parentId") String parentId);
} }
...@@ -39,5 +39,8 @@ public interface TSocialSoldierShenBaoTaskMapper extends BaseMapper<TSocialSoldi ...@@ -39,5 +39,8 @@ public interface TSocialSoldierShenBaoTaskMapper extends BaseMapper<TSocialSoldi
* @return * @return
*/ */
List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(@Param("tSocialSoldierShenBaoTask") TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask); List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(@Param("tSocialSoldierShenBaoTask") TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask);
String getSoldierTaskAddIdByType(@Param("type") String type); List<TSocialSoldierShenBaoTask> getTSocialSoldierTaskListByRe();
TSocialSoldierShenBaoTask getSoldierTaskAddIdByType(@Param("type") String type);
void deleteByPayment();
void deleteByRePayment();
} }
...@@ -57,4 +57,14 @@ public interface TAutoPaymentDetailService extends IService<TAutoPaymentDetail> ...@@ -57,4 +57,14 @@ public interface TAutoPaymentDetailService extends IService<TAutoPaymentDetail>
* @return: void * @return: void
**/ **/
void deleteByParentId(String parentId); void deleteByParentId(String parentId);
/**
* @param parentId
* @Description: 获取被标记的明细,用来更新
* @Author: hgw
* @Date: 2024/6/7 17:50
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail>
**/
List<TAutoPaymentDetail> getListByParentId(String parentId);
} }
...@@ -44,4 +44,7 @@ public interface TAutoPaymentErrorService extends IService<TAutoPaymentError> { ...@@ -44,4 +44,7 @@ public interface TAutoPaymentErrorService extends IService<TAutoPaymentError> {
void listExport(HttpServletResponse response, TAutoPaymentErrorSearchVo searchVo); void listExport(HttpServletResponse response, TAutoPaymentErrorSearchVo searchVo);
List<TAutoPaymentError> noPageDiy(TAutoPaymentErrorSearchVo searchVo); List<TAutoPaymentError> noPageDiy(TAutoPaymentErrorSearchVo searchVo);
void deleteByParentId(String parentId);
} }
...@@ -58,4 +58,13 @@ public interface TAutoPaymentInfoService extends IService<TAutoPaymentInfo> { ...@@ -58,4 +58,13 @@ public interface TAutoPaymentInfoService extends IService<TAutoPaymentInfo> {
**/ **/
TAutoPaymentInfo getThisMonthMainAuto(); TAutoPaymentInfo getThisMonthMainAuto();
/**
* @param parentId
* @Description: 复核发起时,清空url
* @Author: hgw
* @Date: 2024/6/7 17:30
* @return: void
**/
void setUrlToNullByRePayment(String parentId);
} }
...@@ -71,6 +71,6 @@ public interface TSocialSoldierPushService extends IService<TSocialInfo> { ...@@ -71,6 +71,6 @@ public interface TSocialSoldierPushService extends IService<TSocialInfo> {
* @Date: 2024-5-31 16:04:54 * @Date: 2024-5-31 16:04:54
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
R<String> pushPaymentThree(); R<String> pushPaymentThree(String parentId, boolean isReHandle);
} }
...@@ -54,4 +54,12 @@ public interface TSocialSoldierService extends IService<TSocialInfo> { ...@@ -54,4 +54,12 @@ public interface TSocialSoldierService extends IService<TSocialInfo> {
**/ **/
R<String> doInnerGetPaymentThree(); R<String> doInnerGetPaymentThree();
/**
* @Description: 重新办理
* @Author: hgw
* @Date: 2024/6/6 21:36
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> getReHandle(String parentId);
} }
...@@ -36,6 +36,14 @@ public interface TSocialSoldierShenBaoTaskService extends IService<TSocialSoldie ...@@ -36,6 +36,14 @@ public interface TSocialSoldierShenBaoTaskService extends IService<TSocialSoldie
* @return * @return
*/ */
List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask); List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask);
/**
* @param
* @Description: 获取复核记录为未复核的情况
* @Author: hgw
* @Date: 2024/6/7 11:56
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask>
**/
List<TSocialSoldierShenBaoTask> getTSocialSoldierTaskListByRe();
/** /**
* @param type * @param type
...@@ -44,6 +52,22 @@ public interface TSocialSoldierShenBaoTaskService extends IService<TSocialSoldie ...@@ -44,6 +52,22 @@ public interface TSocialSoldierShenBaoTaskService extends IService<TSocialSoldie
* @Date: 2024/5/31 18:13 * @Date: 2024/5/31 18:13
* @return: java.lang.String * @return: java.lang.String
**/ **/
String getSoldierTaskAddIdByType(String type); TSocialSoldierShenBaoTask getSoldierTaskAddIdByType(String type);
/**
* @Description: 删除实缴推送
* @Author: hgw
* @Date: 2024/6/6 21:49
* @return: void
**/
void deleteByPayment();
/**
* @Description: 删除实缴再次推送
* @Author: hgw
* @Date: 2024/6/6 21:50
* @return: void
**/
void deleteByRePayment();
} }
...@@ -181,6 +181,10 @@ public class TAutoPaymentDetailServiceImpl extends ServiceImpl<TAutoPaymentDetai ...@@ -181,6 +181,10 @@ public class TAutoPaymentDetailServiceImpl extends ServiceImpl<TAutoPaymentDetai
public void deleteByParentId(String parentId) { public void deleteByParentId(String parentId) {
baseMapper.deleteByParentId(parentId); baseMapper.deleteByParentId(parentId);
} }
@Override
public List<TAutoPaymentDetail> getListByParentId(String parentId) {
return baseMapper.getListByParentId(parentId);
}
private Long noPageCountDiy(TAutoPaymentDetailSearchVo searchVo) { private Long noPageCountDiy(TAutoPaymentDetailSearchVo searchVo) {
LambdaQueryWrapper<TAutoPaymentDetail> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TAutoPaymentDetail> wrapper = buildQueryWrapper(searchVo);
......
...@@ -127,6 +127,11 @@ public class TAutoPaymentErrorServiceImpl extends ServiceImpl<TAutoPaymentErrorM ...@@ -127,6 +127,11 @@ public class TAutoPaymentErrorServiceImpl extends ServiceImpl<TAutoPaymentErrorM
} }
} }
@Override
public void deleteByParentId(String parentId) {
baseMapper.deleteByParentId(parentId);
}
@Override @Override
public List<TAutoPaymentError> noPageDiy(TAutoPaymentErrorSearchVo searchVo) { public List<TAutoPaymentError> noPageDiy(TAutoPaymentErrorSearchVo searchVo) {
LambdaQueryWrapper<TAutoPaymentError> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TAutoPaymentError> wrapper = buildQueryWrapper(searchVo);
......
...@@ -168,6 +168,11 @@ public class TAutoPaymentInfoServiceImpl extends ServiceImpl<TAutoPaymentInfoMap ...@@ -168,6 +168,11 @@ public class TAutoPaymentInfoServiceImpl extends ServiceImpl<TAutoPaymentInfoMap
return baseMapper.getThisMonthMainAuto(); return baseMapper.getThisMonthMainAuto();
} }
@Override
public void setUrlToNullByRePayment(String parentId) {
baseMapper.setUrlToNullByRePayment(parentId);
}
private Long noPageCountDiy(TAutoPaymentInfoSearchVo searchVo) { private Long noPageCountDiy(TAutoPaymentInfoSearchVo searchVo) {
LambdaQueryWrapper<TAutoPaymentInfo> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TAutoPaymentInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds()); List<String> idList = Common.getList(searchVo.getIds());
......
...@@ -28,9 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig; ...@@ -28,9 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierShenBaoTaskService; import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierPushService;
import com.yifu.cloud.plus.v1.yifu.social.vo.*; import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -61,6 +59,8 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -61,6 +59,8 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
private final SocialConfig socialConfig; private final SocialConfig socialConfig;
private final TSocialInfoService tSocialInfoService; private final TSocialInfoService tSocialInfoService;
private final TSocialSoldierShenBaoTaskService tSocialSoldierShenBaoTaskService; private final TSocialSoldierShenBaoTaskService tSocialSoldierShenBaoTaskService;
private final TAutoPaymentInfoService tAutoPaymentInfoService;
private final TAutoPaymentErrorService tAutoPaymentErrorService;
/** /**
* @param socialList * @param socialList
...@@ -395,6 +395,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -395,6 +395,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask(); TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask();
task.setType(CommonConstants.ONE_STRING); task.setType(CommonConstants.ONE_STRING);
task.setDataStatus(CommonConstants.ZERO_STRING);
this.getOneAppGetModuleDetailByShenBao(task, file, sheetName); this.getOneAppGetModuleDetailByShenBao(task, file, sheetName);
} }
} }
...@@ -407,6 +408,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -407,6 +408,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask(); TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask();
task.setType(CommonConstants.TWO_STRING); task.setType(CommonConstants.TWO_STRING);
task.setDataStatus(CommonConstants.ZERO_STRING);
this.getOneAppGetModuleDetailByShenBao(task, file, sheetName); this.getOneAppGetModuleDetailByShenBao(task, file, sheetName);
} }
} }
...@@ -416,14 +418,43 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -416,14 +418,43 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return R.ok("推送成功!!"); return R.ok("推送成功!!");
} }
/** /**
* @param : isReHandle true:是重新办理
* @Description: 6每月6号推送实缴3张表查询 * @Description: 6每月6号推送实缴3张表查询
* @Author: hgw * @Author: hgw
* @Date: 2024-5-31 16:04:47 * @Date: 2024-5-31 16:04:47
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
@Override @Override
public R<String> pushPaymentThree() { public R<String> pushPaymentThree(String parentId, boolean isReHandle) {
// 先删除推送任务
int type = 3;
if (isReHandle) {
type = 7;
List<TSocialSoldierShenBaoTask> taskList = tSocialSoldierShenBaoTaskService.getTSocialSoldierTaskListByRe();
boolean canReTask = false;
if (taskList != null) {
for (TSocialSoldierShenBaoTask task : taskList) {
// 表示已经有过反馈了
if (CommonConstants.ONE_STRING.equals(task.getDataStatus())) {
canReTask = true;
}
}
if (!canReTask) {
return R.failed("上一次推送的还未获取结果,请先获取复核结果!");
} else {
// 清空原表url
if (Common.isNotNull(parentId)) {
tAutoPaymentErrorService.deleteByParentId(parentId);
tAutoPaymentInfoService.setUrlToNullByRePayment(parentId);
}
}
} else {
tSocialSoldierShenBaoTaskService.deleteByRePayment();
}
} else {
tSocialSoldierShenBaoTaskService.deleteByPayment();
}
// 实缴3张表之1:日常申报 // 实缴3张表之1:日常申报
List<SocialSoldierPaymentSelectOneVo> shenBaolist = baseMapper.getSoldierPaymentSelectOneList(); List<SocialSoldierPaymentSelectOneVo> shenBaolist = baseMapper.getSoldierPaymentSelectOneList();
log.info("实缴3张表之1:日常申报list="+shenBaolist); log.info("实缴3张表之1:日常申报list="+shenBaolist);
...@@ -433,7 +464,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -433,7 +464,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask(); TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask();
// 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询 // 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
task.setType(CommonConstants.THREE_STRING); task.setType(String.valueOf(type));
type++;
task.setDataStatus(CommonConstants.ZERO_STRING);
this.getOneAppGetModuleDetailByShenBao(task, file, sheetName); this.getOneAppGetModuleDetailByShenBao(task, file, sheetName);
} }
} }
...@@ -446,7 +479,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -446,7 +479,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask(); TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask();
// 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询 // 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
task.setType(CommonConstants.FOUR_STRING); task.setType(String.valueOf(type));
type++;
task.setDataStatus(CommonConstants.ZERO_STRING);
this.getOneAppGetModuleDetailByShenBao(task, file, sheetName); this.getOneAppGetModuleDetailByShenBao(task, file, sheetName);
} }
} }
...@@ -459,7 +494,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -459,7 +494,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask(); TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask();
// 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询 // 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
task.setType(CommonConstants.FIVE_STRING); task.setType(String.valueOf(type));
type++;
task.setDataStatus(CommonConstants.ZERO_STRING);
this.getOneAppGetModuleDetailByShenBao(task, file, sheetName); this.getOneAppGetModuleDetailByShenBao(task, file, sheetName);
} }
} }
...@@ -472,7 +509,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -472,7 +509,9 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask(); TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask();
// 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询;6:实缴3单位缴费明细下载 // 1申报;2调整;3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询;6:实缴3单位缴费明细下载
task.setType(CommonConstants.SIX_STRING); task.setType(String.valueOf(type));
type++;
task.setDataStatus(CommonConstants.ZERO_STRING);
this.getOneAppGetModuleDetailByShenBao(task, file, sheetName); this.getOneAppGetModuleDetailByShenBao(task, file, sheetName);
} }
} }
......
...@@ -77,7 +77,316 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -77,7 +77,316 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
private final TAutoPaymentDetailService tAutoPaymentDetailService; private final TAutoPaymentDetailService tAutoPaymentDetailService;
private final OSSUtil ossUtil; private final OSSUtil ossUtil;
// 附件
private final String RESULT_ANNEX = "resultAnnex";
/**
* @Description: 6每月6号定时任务获取社保士兵实缴3张表
* @Author: hgw
* @Date: 2024-5-30 18:01:11
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<String> getReHandle(String parentId) {
TAutoPaymentInfo mainAuto = tAutoPaymentInfoService.getById(parentId);
if (mainAuto == null || Common.isEmpty(mainAuto.getId())) {
return R.failed("未找到主表");
} else {
mainAuto.setRepeatReviewFlag(CommonConstants.ZERO_STRING);
tAutoPaymentInfoService.updateById(mainAuto);
}
// 3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
int type = 7;
TSocialSoldierShenBaoTask addIdOneTask = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(String.valueOf(type));
type++;
TSocialSoldierShenBaoTask addIdTwoTask = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(String.valueOf(type));
type++;
TSocialSoldierShenBaoTask addIdThreeTask = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(String.valueOf(type));
type++;
TSocialSoldierShenBaoTask addIdSixTask = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(String.valueOf(type));
String addIdOne = null;
String addIdOTwo = null;
String addIdThree = null;
String addIdSix = null;
if (addIdOneTask != null && Common.isNotNull(addIdOneTask.getId())) {
addIdOne = addIdOneTask.getAddId();
}
if (addIdTwoTask != null && Common.isNotNull(addIdTwoTask.getId())) {
addIdOTwo = addIdTwoTask.getAddId();
}
if (addIdThreeTask != null && Common.isNotNull(addIdThreeTask.getId())) {
addIdThree = addIdThreeTask.getAddId();
}
if (addIdSixTask != null && Common.isNotNull(addIdSixTask.getId())) {
addIdSix = addIdSixTask.getAddId();
}
HttpURLConnection conn;
InputStream inRiChang = null;
InputStream inRenYuan = null;
InputStream inDanWei = null;
InputStream inDanWeiXiaZai = null;
// 1日常申报导出;2人员缴费明细打印;3单位缴费明细查询
R<String> resultFile = socialConfig.getFiveJob(restTemplate, addIdOne, RESULT_ANNEX);
R<String> resultFileTwo = socialConfig.getFiveJob(restTemplate, addIdOTwo, RESULT_ANNEX);
R<String> resultFileThree = socialConfig.getFiveJob(restTemplate, addIdThree, RESULT_ANNEX);
R<String> resultFileFour = socialConfig.getFiveJob(restTemplate, addIdSix, RESULT_ANNEX);
if (Common.isNotNull(resultFile) || Common.isNotNull(resultFileTwo)
|| Common.isNotNull(resultFileThree) || Common.isNotNull(resultFileFour)) {
// 获取需要更新的标记文件:
List<TAutoPaymentDetail> detailList = tAutoPaymentDetailService.getListByParentId(parentId);
if (detailList == null || detailList.isEmpty()) {
return R.failed("未找到标记数据!");
}
Map<String, TAutoPaymentDetail> oneMap = new HashMap<>();
Map<String, TAutoPaymentDetail> twoMap = new HashMap<>();
Map<String, TAutoPaymentDetail> threeMap = new HashMap<>();
Map<String, TAutoPaymentDetail> fourMap = new HashMap<>();
for (TAutoPaymentDetail detail : detailList) {
if (CommonConstants.ONE_STRING.equals(detail.getSourceType())) {
oneMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType(), detail);
}
if (CommonConstants.TWO_STRING.equals(detail.getSourceType())) {
twoMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType(), detail);
}
if (CommonConstants.THREE_STRING.equals(detail.getSourceType())) {
threeMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType(), detail);
}
if (CommonConstants.FOUR_STRING.equals(detail.getSourceType())) {
fourMap.put(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING + detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING + detail.getInsuranceType(), detail);
}
}
ZipOutputStream zipOut = null;
try {
boolean reFlag = true;
List<TAutoPaymentDetail> detailListOne = null;
List<TAutoPaymentDetail> detailListTwo = null;
List<TAutoPaymentDetail> detailListThree = null;
List<TAutoPaymentDetail> detailListFour = null;
URL url;
String fileTeturnUrl;
// 解决中文文件名的乱码问题
if (Common.isNotNull(resultFile)) {
fileTeturnUrl = resultFile.getData();
if (Common.isNotNull(fileTeturnUrl)) {
fileTeturnUrl = this.getEncodeUrl(fileTeturnUrl);
url = new URL(fileTeturnUrl);
conn = (HttpURLConnection) url.openConnection();
//设置超时间为30秒
conn.setConnectTimeout(30 * 1000);
inRiChang = conn.getInputStream();
// 原表ZIP-1日常申报流
mainAuto.setAttaUrlOne(fileTeturnUrl);
/*zipOut.putNextEntry(new ZipEntry("riChangShenBao_file.zip"));
int bytesRead;
while((bytesRead = inRiChang.read())!=-1) {
zipOut.write(bytesRead);
}
zipOut.closeEntry();*/
/*entry = new ZipEntry("riChangShenBao_file.zip");
bytes = new byte[20480000];
if (inRiChang != null) {
zipOut.putNextEntry(entry);
while ((len = inRiChang.read(bytes)) > 0) {
zipOut.write(bytes, 0, len);
}
}*/
// 实际读取文件内容
R<List<TAutoPaymentDetail>> detailROne = this.readZipByPayment(reFlag, oneMap, zipOut, inRiChang, 1, mainAuto);
if (detailROne != null && CommonConstants.SUCCESS.equals(detailROne.getCode()) && detailROne.getData() != null && !detailROne.getData().isEmpty()) {
detailListOne = detailROne.getData();
if (detailListOne != null && !detailListOne.isEmpty()) {
tAutoPaymentDetailService.updateBatchById(detailListOne);
}
mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
addIdOneTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdOneTask);
}
}
}
if (Common.isNotNull(resultFileTwo)) {
fileTeturnUrl = resultFileTwo.getData();
if (Common.isNotNull(fileTeturnUrl)) {
fileTeturnUrl = this.getEncodeUrl(fileTeturnUrl);
url = new URL(fileTeturnUrl);
conn = (HttpURLConnection) url.openConnection();
//设置超时间为30秒
conn.setConnectTimeout(30 * 1000);
inRenYuan = conn.getInputStream();
// 原表ZIP-2人员缴费明细打印;
mainAuto.setAttaUrlTwo(fileTeturnUrl);
/*if (inRenYuan != null) {
entry = new ZipEntry("renYuanMingXi_file.zip");
zipOut.putNextEntry(entry);
bytes = new byte[20480000];
while ((len = inRenYuan.read(bytes)) > 0) {
zipOut.write(bytes, 0, len);
}
}*/
// 实际读取文件内容
R<List<TAutoPaymentDetail>> detailRTwo = this.readZipByPayment(reFlag, twoMap, zipOut, inRenYuan, 2, mainAuto);
if (detailRTwo != null && CommonConstants.SUCCESS.equals(detailRTwo.getCode()) && detailRTwo.getData() != null && !detailRTwo.getData().isEmpty()) {
detailListTwo = detailRTwo.getData();
if (detailListTwo != null && !detailListTwo.isEmpty()) {
tAutoPaymentDetailService.updateBatchById(detailListTwo);
}
mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
addIdTwoTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdTwoTask);
}
}
}
if (Common.isNotNull(resultFileThree)) {
fileTeturnUrl = resultFileThree.getData();
if (Common.isNotNull(fileTeturnUrl)) {
fileTeturnUrl = this.getEncodeUrl(fileTeturnUrl);
url = new URL(fileTeturnUrl);
conn = (HttpURLConnection) url.openConnection();
//设置超时间为30秒
conn.setConnectTimeout(30 * 1000);
inDanWei = conn.getInputStream();
// 原表ZIP-3单位缴费明细查询
mainAuto.setAttaUrlThree(fileTeturnUrl);
/*zipOut.putNextEntry(new ZipEntry("danWeiMingXi_file.zip"));
int bytesRead;
while((bytesRead = inDanWei.read())!=-1) {
zipOut.write(bytesRead);
}
zipOut.closeEntry();*/
/*if (inDanWei != null) {
entry = new ZipEntry("danWeiMingXi_file.zip");
zipOut.putNextEntry(entry);
bytes = new byte[20480000];
while ((len = inDanWei.read(bytes)) > 0) {
zipOut.write(bytes, 0, len);
}
}*/
// 实际读取文件内容
R<List<TAutoPaymentDetail>> detailRThree = this.readZipByPayment(reFlag, threeMap, zipOut, inDanWei, 3, mainAuto);
if (detailRThree != null && CommonConstants.SUCCESS.equals(detailRThree.getCode()) && detailRThree.getData() != null && !detailRThree.getData().isEmpty()) {
detailListThree = detailRThree.getData();
if (detailListThree != null && !detailListThree.isEmpty()) {
tAutoPaymentDetailService.updateBatchById(detailListThree);
}
mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
addIdThreeTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdThreeTask);
}
}
}
if ((detailListThree == null || detailListThree.isEmpty()) && Common.isNotNull(resultFileFour)) {
fileTeturnUrl = resultFileFour.getData();
if (Common.isNotNull(fileTeturnUrl)) {
fileTeturnUrl = this.getEncodeUrl(fileTeturnUrl);
url = new URL(fileTeturnUrl);
conn = (HttpURLConnection) url.openConnection();
//设置超时间为30秒
conn.setConnectTimeout(30 * 1000);
inDanWeiXiaZai = conn.getInputStream();
// 原表ZIP-4单位缴费明细下载
mainAuto.setAttaUrlFour(fileTeturnUrl);
/*if (inDanWeiXiaZai != null) {
entry = new ZipEntry("danWeiXiaZai_file.zip");
zipOut.putNextEntry(entry);
bytes = new byte[20480000];
while ((len = inDanWeiXiaZai.read(bytes)) > 0) {
zipOut.write(bytes, 0, len);
}
}*/
// 实际读取文件内容
R<List<TAutoPaymentDetail>> detailRFour = this.readZipByPayment(reFlag, fourMap, zipOut, inDanWeiXiaZai, 4, mainAuto);
if (detailRFour != null && CommonConstants.SUCCESS.equals(detailRFour.getCode()) && detailRFour.getData() != null && !detailRFour.getData().isEmpty()) {
detailListFour = detailRFour.getData();
if (detailListFour != null && !detailListFour.isEmpty()) {
tAutoPaymentDetailService.updateBatchById(detailListFour);
}
mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
addIdSixTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdSixTask);
}
}
}
/*ByteArrayOutputStream baos = new ByteArrayOutputStream();
// 将ZipOutputStream的内容写入ByteArrayOutputStream
byte[] buffer = new byte[1024];
int reads;
while((reads = byteArrayInputStream.read(buffer)) != -1){
zipOut.write(buffer, 0, reads);
}
InputStream byteArrayInputStream = new ByteArrayInputStream(buffer);*/
// 上传Zip
/*boolean flag = ossUtil.uploadFileByFile(zipFile, key, null);
// 完成和释放资源
//baos.close();
if (flag) {
mainAuto.setAttaSrc(key);
} else {
return R.failed("failed:上传至存储空间失败");
}*/
tAutoPaymentInfoService.updateById(mainAuto);
// 核验
if (detailListOne != null && !detailListOne.isEmpty()
|| detailListTwo != null && !detailListTwo.isEmpty()
|| detailListThree != null && !detailListThree.isEmpty()
|| detailListFour != null && !detailListFour.isEmpty()
) {
// 复核-核验1:
baseMapper.getSoldierPaymentErrorInfoOneByRe(mainAuto.getId());
// 复核-核验2:
baseMapper.getSoldierPaymentErrorInfoTwoByRe(mainAuto.getId());
// 重新复核状态
mainAuto.setRepeatReviewFlag(CommonConstants.TWO_STRING);
tAutoPaymentInfoService.updateById(mainAuto);
}
} catch(Exception e){
e.printStackTrace();
} finally{
try {
if (inRiChang != null) {
inRiChang.close();
}
if (inRenYuan != null) {
inRenYuan.close();
}
if (inDanWei != null) {
inDanWei.close();
}
if (inDanWeiXiaZai != null) {
inDanWeiXiaZai.close();
}
if (zipOut != null) {
zipOut.closeEntry();
zipOut.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
return R.ok();
}
/** /**
* @Description: 6每月6号定时任务获取社保士兵实缴3张表 * @Description: 6每月6号定时任务获取社保士兵实缴3张表
...@@ -88,23 +397,39 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -88,23 +397,39 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
@Override @Override
public R<String> doInnerGetPaymentThree() { public R<String> doInnerGetPaymentThree() {
// 3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询 // 3:实缴1日常申报导出;4:实缴2人员缴费明细打印;5:实缴3单位缴费明细查询
String addIdOne = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(CommonConstants.THREE_STRING); TSocialSoldierShenBaoTask addIdOneTask = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(CommonConstants.THREE_STRING);
String addIdOTwo = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(CommonConstants.FOUR_STRING); TSocialSoldierShenBaoTask addIdTwoTask = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(CommonConstants.FOUR_STRING);
String addIdThree = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(CommonConstants.FIVE_STRING); TSocialSoldierShenBaoTask addIdThreeTask = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(CommonConstants.FIVE_STRING);
String addIdSix = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(CommonConstants.SIX_STRING); TSocialSoldierShenBaoTask addIdSixTask = tSocialSoldierShenBaoTaskService.getSoldierTaskAddIdByType(CommonConstants.SIX_STRING);
String addIdOne = null;
String addIdOTwo = null;
String addIdThree = null;
String addIdSix = null;
if (addIdOneTask != null && Common.isNotNull(addIdOneTask.getId())) {
addIdOne = addIdOneTask.getAddId();
}
if (addIdTwoTask != null && Common.isNotNull(addIdTwoTask.getId())) {
addIdOTwo = addIdTwoTask.getAddId();
}
if (addIdThreeTask != null && Common.isNotNull(addIdThreeTask.getId())) {
addIdThree = addIdThreeTask.getAddId();
}
if (addIdSixTask != null && Common.isNotNull(addIdSixTask.getId())) {
addIdSix = addIdSixTask.getAddId();
}
HttpURLConnection conn; HttpURLConnection conn;
InputStream inRiChang = null; InputStream inRiChang = null;
InputStream inRenYuan = null; InputStream inRenYuan = null;
InputStream inDanWei = null; InputStream inDanWei = null;
InputStream inDanWeiXiaZai = null; InputStream inDanWeiXiaZai = null;
// 1日常申报导出;2人员缴费明细打印;3单位缴费明细查询 // 1日常申报导出;2人员缴费明细打印;3单位缴费明细查询
R<String> resultFile = socialConfig.getFiveJob(restTemplate, addIdOne, "resultAnnex"); R<String> resultFile = socialConfig.getFiveJob(restTemplate, addIdOne, RESULT_ANNEX);
R<String> resultFileTwo = socialConfig.getFiveJob(restTemplate, addIdOTwo, "resultAnnex"); R<String> resultFileTwo = socialConfig.getFiveJob(restTemplate, addIdOTwo, RESULT_ANNEX);
R<String> resultFileThree = socialConfig.getFiveJob(restTemplate, addIdThree, "resultAnnex"); R<String> resultFileThree = socialConfig.getFiveJob(restTemplate, addIdThree, RESULT_ANNEX);
R<String> resultFileFour = socialConfig.getFiveJob(restTemplate, addIdSix, "resultAnnex"); R<String> resultFileFour = socialConfig.getFiveJob(restTemplate, addIdSix, RESULT_ANNEX);
if (Common.isNotNull(resultFile) || Common.isNotNull(resultFileTwo) if (Common.isNotNull(resultFile) || Common.isNotNull(resultFileTwo)
|| Common.isNotNull(resultFileThree) || Common.isNotNull(resultFileFour)) { || Common.isNotNull(resultFileThree) || Common.isNotNull(resultFileFour)) {
boolean reFlag = false;
ZipOutputStream zipOut = null; ZipOutputStream zipOut = null;
try { try {
// 1查询主表 // 1查询主表
...@@ -180,9 +505,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -180,9 +505,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
}*/ }*/
// 实际读取文件内容 // 实际读取文件内容
R<List<TAutoPaymentDetail>> detailROne = this.readZipByPayment(zipOut, inRiChang, 1, mainAuto); R<List<TAutoPaymentDetail>> detailROne = this.readZipByPayment(reFlag, null, zipOut, inRiChang, 1, mainAuto);
if (detailROne != null && CommonConstants.SUCCESS.equals(detailROne.getCode()) && detailROne.getData() != null && !detailROne.getData().isEmpty()) { if (detailROne != null && CommonConstants.SUCCESS.equals(detailROne.getCode()) && detailROne.getData() != null && !detailROne.getData().isEmpty()) {
detailListOne = detailROne.getData(); detailListOne = detailROne.getData();
if (detailListOne != null && !detailListOne.isEmpty()) {
tAutoPaymentDetailService.saveBatch(detailListOne);
addIdOneTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdOneTask);
}
mainAuto.setDataOneFlag(CommonConstants.ONE_STRING); mainAuto.setDataOneFlag(CommonConstants.ONE_STRING);
} }
} }
...@@ -208,9 +538,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -208,9 +538,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
}*/ }*/
// 实际读取文件内容 // 实际读取文件内容
R<List<TAutoPaymentDetail>> detailRTwo = this.readZipByPayment(zipOut, inRenYuan, 2, mainAuto); R<List<TAutoPaymentDetail>> detailRTwo = this.readZipByPayment(reFlag, null, zipOut, inRenYuan, 2, mainAuto);
if (detailRTwo != null && CommonConstants.SUCCESS.equals(detailRTwo.getCode()) && detailRTwo.getData() != null && !detailRTwo.getData().isEmpty()) { if (detailRTwo != null && CommonConstants.SUCCESS.equals(detailRTwo.getCode()) && detailRTwo.getData() != null && !detailRTwo.getData().isEmpty()) {
detailListTwo = detailRTwo.getData(); detailListTwo = detailRTwo.getData();
if (detailListTwo != null && !detailListTwo.isEmpty()) {
tAutoPaymentDetailService.saveBatch(detailListTwo);
addIdTwoTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdTwoTask);
}
mainAuto.setDataTwoFlag(CommonConstants.ONE_STRING); mainAuto.setDataTwoFlag(CommonConstants.ONE_STRING);
} }
} }
...@@ -241,14 +576,19 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -241,14 +576,19 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
}*/ }*/
// 实际读取文件内容 // 实际读取文件内容
R<List<TAutoPaymentDetail>> detailRThree = this.readZipByPayment(zipOut, inDanWei, 3, mainAuto); R<List<TAutoPaymentDetail>> detailRThree = this.readZipByPayment(reFlag, null, zipOut, inDanWei, 3, mainAuto);
if (detailRThree != null && CommonConstants.SUCCESS.equals(detailRThree.getCode()) && detailRThree.getData() != null && !detailRThree.getData().isEmpty()) { if (detailRThree != null && CommonConstants.SUCCESS.equals(detailRThree.getCode()) && detailRThree.getData() != null && !detailRThree.getData().isEmpty()) {
detailListThree = detailRThree.getData(); detailListThree = detailRThree.getData();
if (detailListThree != null && !detailListThree.isEmpty()) {
tAutoPaymentDetailService.saveBatch(detailListThree);
addIdThreeTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdThreeTask);
}
mainAuto.setDataThreeFlag(CommonConstants.ONE_STRING); mainAuto.setDataThreeFlag(CommonConstants.ONE_STRING);
} }
} }
} }
if (Common.isNotNull(resultFileFour)) { if ((detailListThree == null || detailListThree.isEmpty()) && Common.isNotNull(resultFileFour)) {
fileTeturnUrl = resultFileFour.getData(); fileTeturnUrl = resultFileFour.getData();
if (Common.isNotNull(fileTeturnUrl)) { if (Common.isNotNull(fileTeturnUrl)) {
fileTeturnUrl = this.getEncodeUrl(fileTeturnUrl); fileTeturnUrl = this.getEncodeUrl(fileTeturnUrl);
...@@ -268,9 +608,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -268,9 +608,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
}*/ }*/
// 实际读取文件内容 // 实际读取文件内容
R<List<TAutoPaymentDetail>> detailRFour = this.readZipByPayment(zipOut, inDanWeiXiaZai, 3, mainAuto); R<List<TAutoPaymentDetail>> detailRFour = this.readZipByPayment(reFlag, null, zipOut, inDanWeiXiaZai, 4, mainAuto);
if (detailRFour != null && CommonConstants.SUCCESS.equals(detailRFour.getCode()) && detailRFour.getData() != null && !detailRFour.getData().isEmpty()) { if (detailRFour != null && CommonConstants.SUCCESS.equals(detailRFour.getCode()) && detailRFour.getData() != null && !detailRFour.getData().isEmpty()) {
detailListFour = detailRFour.getData(); detailListFour = detailRFour.getData();
if (detailListFour != null && !detailListFour.isEmpty()) {
tAutoPaymentDetailService.saveBatch(detailListFour);
addIdSixTask.setDataStatus(CommonConstants.ONE_STRING);
tSocialSoldierShenBaoTaskService.updateById(addIdSixTask);
}
mainAuto.setDataThreeFlag(CommonConstants.ONE_STRING); mainAuto.setDataThreeFlag(CommonConstants.ONE_STRING);
} }
} }
...@@ -311,6 +656,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -311,6 +656,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
baseMapper.getSoldierPaymentErrorInfoOne(mainAuto.getId()); baseMapper.getSoldierPaymentErrorInfoOne(mainAuto.getId());
// 核验2: // 核验2:
baseMapper.getSoldierPaymentErrorInfoTwo(mainAuto.getId()); baseMapper.getSoldierPaymentErrorInfoTwo(mainAuto.getId());
mainAuto.setSystemReviewFlag(CommonConstants.TWO_STRING);
tAutoPaymentInfoService.updateById(mainAuto);
} }
} catch(Exception e){ } catch(Exception e){
e.printStackTrace(); e.printStackTrace();
...@@ -341,13 +688,17 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -341,13 +688,17 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
/** /**
* @param reFlag true :复核
* @param oldMap 被标记的map
* @param type 1日常申报导出;2人员缴费明细打印;3单位缴费明细查询 * @param type 1日常申报导出;2人员缴费明细打印;3单位缴费明细查询
* @Description: 读取实缴3张表 * @Description: 读取实缴3张表
* @Author: hgw * @Author: hgw
* @Date: 2024/6/3 18:17 * @Date: 2024/6/3 18:17
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail>> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail>>
**/ **/
public R<List<TAutoPaymentDetail>> readZipByPayment(ZipOutputStream zipOut, InputStream inputStream, int type, TAutoPaymentInfo mainAuto) { public R<List<TAutoPaymentDetail>> readZipByPayment(boolean reFlag, Map<String, TAutoPaymentDetail> oldMap, ZipOutputStream zipOut
, InputStream inputStream, int type, TAutoPaymentInfo mainAuto) {
TAutoPaymentDetail oldDetail;
TAutoPaymentDetail detail; TAutoPaymentDetail detail;
TAutoPaymentDetail detailPerson; TAutoPaymentDetail detailPerson;
List<TAutoPaymentDetail> voList = new ArrayList<>(); List<TAutoPaymentDetail> voList = new ArrayList<>();
...@@ -644,8 +995,20 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -644,8 +995,20 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else { } else {
detail.setCreateMonth(nowMonth); detail.setCreateMonth(nowMonth);
} }
voList.add(detail); if (reFlag) {
if (oldMap != null) {
// 复核使用的
oldDetail = oldMap.get(detail.getCertNum() + CommonConstants.DOWN_LINE_STRING
+ detail.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING
+ detail.getInsuranceType());
if (oldDetail != null) {
detail.setId(oldDetail.getId());
voList.add(detail);
}
}
} else{
voList.add(detail);
}
// 个人的拆为第二条 // 个人的拆为第二条
if (Common.isNotNull(personLimit)) { if (Common.isNotNull(personLimit)) {
money = new BigDecimal(personLimit); money = new BigDecimal(personLimit);
...@@ -672,7 +1035,20 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -672,7 +1035,20 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else { } else {
detailPerson.setCreateMonth(nowMonth); detailPerson.setCreateMonth(nowMonth);
} }
voList.add(detailPerson); if (reFlag) {
if (oldMap != null) {
// 复核使用的
oldDetail = oldMap.get(detailPerson.getCertNum() + CommonConstants.DOWN_LINE_STRING
+ detailPerson.getSocialSecurityAccount() + CommonConstants.DOWN_LINE_STRING
+ detailPerson.getInsuranceType());
if (oldDetail != null) {
detailPerson.setId(oldDetail.getId());
voList.add(detailPerson);
}
}
} else{
voList.add(detailPerson);
}
} }
} }
} }
...@@ -911,9 +1287,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -911,9 +1287,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
ex.printStackTrace(); ex.printStackTrace();
} }
} }
if (voList != null && !voList.isEmpty()) {
tAutoPaymentDetailService.saveBatch(voList);
}
return R.ok(voList); return R.ok(voList);
} }
...@@ -973,7 +1346,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -973,7 +1346,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
Map<String, FailReasonConfig> errorMap = failReasonConfigService.getFailReasonMap(); Map<String, FailReasonConfig> errorMap = failReasonConfigService.getFailReasonMap();
if (!addIdSet.isEmpty()) { if (!addIdSet.isEmpty()) {
for (String doAddId : addIdSet) { for (String doAddId : addIdSet) {
R<String> resultFile = socialConfig.getFiveJob(restTemplate, doAddId, "resultAnnex"); R<String> resultFile = socialConfig.getFiveJob(restTemplate, doAddId, RESULT_ANNEX);
log.info("resultFileByAudit=" + resultFile); log.info("resultFileByAudit=" + resultFile);
try { try {
// 解决中文文件名的乱码问题 // 解决中文文件名的乱码问题
......
...@@ -44,13 +44,27 @@ public class TSocialSoldierShenBaoTaskServiceImpl extends ServiceImpl<TSocialSol ...@@ -44,13 +44,27 @@ public class TSocialSoldierShenBaoTaskServiceImpl extends ServiceImpl<TSocialSol
public List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask) { public List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask) {
return baseMapper.getTSocialSoldierShenBaoTaskList(tSocialSoldierShenBaoTask); return baseMapper.getTSocialSoldierShenBaoTaskList(tSocialSoldierShenBaoTask);
} }
@Override
public List<TSocialSoldierShenBaoTask> getTSocialSoldierTaskListByRe() {
return baseMapper.getTSocialSoldierTaskListByRe();
}
/** /**
* 获取任务id * 获取任务id
* @return * @return
*/ */
@Override @Override
public String getSoldierTaskAddIdByType(String type) { public TSocialSoldierShenBaoTask getSoldierTaskAddIdByType(String type) {
return baseMapper.getSoldierTaskAddIdByType(type); return baseMapper.getSoldierTaskAddIdByType(type);
} }
@Override
public void deleteByPayment() {
baseMapper.deleteByPayment();
}
@Override
public void deleteByRePayment() {
baseMapper.deleteByRePayment();
}
} }
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="parentId" column="PARENT_ID"/> <result property="parentId" column="PARENT_ID"/>
<result property="sourceType" column="SOURCE_TYPE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -67,6 +68,7 @@ ...@@ -67,6 +68,7 @@
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_BY,
a.UPDATE_TIME, a.UPDATE_TIME,
a.SOURCE_TYPE,
a.PARENT_ID a.PARENT_ID
</sql> </sql>
<sql id="tAutoPaymentDetail_where"> <sql id="tAutoPaymentDetail_where">
...@@ -151,4 +153,14 @@ ...@@ -151,4 +153,14 @@
delete from t_auto_payment_detail where PARENT_ID = #{parentId} delete from t_auto_payment_detail where PARENT_ID = #{parentId}
</delete> </delete>
<!--tAutoPaymentDetail简单分页查询-->
<select id="getListByParentId" resultMap="tAutoPaymentDetailMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_auto_payment_detail a
where PARENT_ID = #{parentId} and REPEAT_HANDLE_FLAG = '0'
order by a.SOURCE_TYPE,a.CERT_NUM
</select>
</mapper> </mapper>
...@@ -75,4 +75,9 @@ ...@@ -75,4 +75,9 @@
<include refid="tAutoPaymentError_where"/> <include refid="tAutoPaymentError_where"/>
</where> </where>
</select> </select>
<delete id="deleteByParentId">
delete from t_auto_payment_error where PARENT_ID = #{parentId}
</delete>
</mapper> </mapper>
...@@ -138,4 +138,10 @@ ...@@ -138,4 +138,10 @@
FROM t_auto_payment_info a FROM t_auto_payment_info a
where a.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') where a.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m')
</select> </select>
<!-- 重新办理,清空url -->
<update id="setUrlToNullByRePayment" >
update t_auto_payment_info a set a.ATTA_URL_ONE = null,a.ATTA_URL_TWO = null,a.ATTA_URL_THREE = null,a.ATTA_URL_FOUR = null where id = #{parentId}
</update>
</mapper> </mapper>
...@@ -283,17 +283,30 @@ ...@@ -283,17 +283,30 @@
<!-- 社保士兵实缴3张表查询1_合肥-社保费管理客户端-日常申报导出 --> <!-- 社保士兵实缴3张表查询1_合肥-社保费管理客户端-日常申报导出 -->
<select id="getSoldierPaymentSelectOneList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectOneVo"> <select id="getSoldierPaymentSelectOneList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectOneVo">
select select
'' companyNo ,s.NAME companyName,'' isPrint,'' createMonth,'是' isDownLoad,'' danDuoSheet '' companyNo ,s.NAME companyName,'' isPrint,'' createMonth,'是' isDownLoad,'' danDuoSheet
,'' danDanSheet,'' duoDanSheet,'' startDate,'' endDate,'' isSalary,'' returnInfo ,'否' danDanSheet,'是' duoDanSheet,'' startDate,'' endDate,'' isSalary,'' returnInfo
from sys_house_hold_info s from sys_house_hold_info s
where s.DEL_FLAG='0' and s.TYPE = '0' and s.AUTO_STATUS = '0' where s.DEL_FLAG='0' and s.TYPE = '0' and s.AUTO_STATUS = '0'
</select> </select>
<!-- 社保士兵实缴3张表查询2_合肥-社保-人员缴费明细打印 --> <!-- 社保士兵实缴3张表查询2_合肥-社保-人员缴费明细打印 -->
<select id="getSoldierPaymentSelectTwoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectTwoVo"> <select id="getSoldierPaymentSelectTwoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectTwoVo">
select select
s.NAME companyName,'' paymentType,'' payMonth,'' returnInfo,'' returnInfoOne,'' returnInfoTwo a.companyName,a.empIdCard idCard,a.empName,'' paymentType,'' userStatus,'' startDate,'' endDate,'' returnInfo,'' returnInfoOne,'' returnInfoTwo
from sys_house_hold_info s from (
where s.DEL_FLAG='0' and s.TYPE = '0' and s.AUTO_STATUS = '0' select
s.SOCIAL_HOUSEHOLD_NAME companyName,s.EMP_NAME empName,s.EMP_IDCARD empIdCard
from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
union all
select
s.SOCIAL_HOUSEHOLD_NAME companyName,s.EMP_NAME empName,s.EMP_IDCARD empIdCard
from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
) a GROUP BY a.empIdCard
</select> </select>
<!-- 社保士兵实缴3张表查询3_合肥-医保-单位缴费明细查询 --> <!-- 社保士兵实缴3张表查询3_合肥-医保-单位缴费明细查询 -->
<select id="getSoldierPaymentSelectThreeList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectThreeVo"> <select id="getSoldierPaymentSelectThreeList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierPaymentSelectThreeVo">
...@@ -566,4 +579,272 @@ ...@@ -566,4 +579,272 @@
</insert> </insert>
<!-- 复核-核验1户 -->
<insert id="getSoldierPaymentErrorInfoOneByRe">
insert into t_auto_payment_error
select concat(d.id,'_1_',#{parentId}) id,#{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该员工的姓名、社保户与派单不一致' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT
and p.EMP_NAME = d.EMP_NAME
and p.EMP_IDCARD = d.CERT_NUM
)
and not EXISTS (
select 1 from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM
and s.EMP_NAME = d.EMP_NAME
and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
)
and not EXISTS (
select 1 from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM
and s.EMP_NAME = d.EMP_NAME
and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
)
</insert>
<!-- 复核-核验2险种 -->
<insert id="getSoldierPaymentErrorInfoTwoByRe">
insert into t_auto_payment_error
select concat(d.id,'_2_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本养老保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_PENSION_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_PERSION_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_PERSION_MONEY > 0
)
union all
select concat(d.id,'_3_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本养老保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_PENSION_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.PERSONAL_PERSION_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.PERSONAL_PERSION_MONEY > 0
)
union all
select concat(d.id,'_4_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '失业保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_UNEMPLOYMENT_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_UNEMPLOYMENT_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_UNEMPLOYMENT_MONEY > 0
)
union all
select concat(d.id,'_5_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '失业保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_UNEMPLOYMENT_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.PERSONAL_UNEMPLOYMENT_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.PERSONAL_UNEMPLOYMENT_MONEY > 0
)
union all
select concat(d.id,'_6_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本医疗保险(个人缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_MEDICAL_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.PERSONAL_MEDICAL_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.PERSONAL_MEDICAL_MONEY > 0
)
union all
select concat(d.id,'_7_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '职工基本医疗保险(单位缴纳)'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_MEDICAL_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_MEDICAL_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_MEDICAL_MONEY > 0
)
union all
select concat(d.id,'_8_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '工伤保险'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_INJURY_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_INJURY_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_INJURY_MONEY > 0
)
union all
select concat(d.id,'_9_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '单位大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIGMAILMENT_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_BIGAILMENT_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_BIGAILMENT_MONEY > 0
)
union all
select concat(d.id,'_10_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '个人大病救助金'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.PERSONAL_BIGMAILMENT_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.PERSONAL_BIGAILMENT_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.PERSONAL_BIGAILMENT_MONEY > 0
)
union all
select concat(d.id,'_11_', #{parentId}) id, #{parentId} PARENT_ID,d.CERT_NUM,d.EMP_NAME,d.SOCIAL_SECURITY_ACCOUNT,d.INSURANCE_TYPE,'该险种无此派单或该险种已减员' ERROR_INFO
from t_auto_payment_detail d where d.CREATE_MONTH = DATE_FORMAT(now(),'%Y%m') and d.REPEAT_HANDLE_FLAG = '0'
and d.INSURANCE_TYPE = '单位生育'
and not EXISTS (
select 1 from t_payment_info_2024 p where p.SOCIAL_CREATE_MONTH = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and p.SOCIAL_HOUSEHOLD = d.SOCIAL_SECURITY_ACCOUNT and p.EMP_NAME = d.EMP_NAME and p.EMP_IDCARD = d.CERT_NUM
and p.UNIT_BIRTH_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_BIRTH_MONEY > 0
)
and not EXISTS (
select 1 from t_social_info s left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '1' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
and s.EMP_IDCARD = d.CERT_NUM and s.EMP_NAME = d.EMP_NAME and s.SOCIAL_HOUSEHOLD_NAME = d.SOCIAL_SECURITY_ACCOUNT
and s.UNIT_BIRTH_MONEY > 0
)
</insert>
</mapper> </mapper>
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<id property="id" column="ID"/> <id property="id" column="ID"/>
<result property="addId" column="ADD_ID"/> <result property="addId" column="ADD_ID"/>
<result property="type" column="TYPE"/> <result property="type" column="TYPE"/>
<result property="dataStatus" column="DATA_STATUS"/>
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
a.ID, a.ID,
a.ADD_ID, a.ADD_ID,
a.TYPE, a.TYPE,
a.DATA_STATUS,
a.CREATE_BY, a.CREATE_BY,
a.UPDATE_BY, a.UPDATE_BY,
a.CREATE_NAME, a.CREATE_NAME,
...@@ -54,6 +56,9 @@ ...@@ -54,6 +56,9 @@
<if test="tSocialSoldierShenBaoTask.type != null and tSocialSoldierShenBaoTask.type.trim() != ''"> <if test="tSocialSoldierShenBaoTask.type != null and tSocialSoldierShenBaoTask.type.trim() != ''">
AND a.TYPE = #{tSocialSoldierShenBaoTask.type} AND a.TYPE = #{tSocialSoldierShenBaoTask.type}
</if> </if>
<if test="tSocialSoldierShenBaoTask.dataStatus != null and tSocialSoldierShenBaoTask.dataStatus.trim() != ''">
AND a.DATA_STATUS = #{tSocialSoldierShenBaoTask.dataStatus}
</if>
<if test="tSocialSoldierShenBaoTask.createBy != null and tSocialSoldierShenBaoTask.createBy.trim() != ''"> <if test="tSocialSoldierShenBaoTask.createBy != null and tSocialSoldierShenBaoTask.createBy.trim() != ''">
AND a.CREATE_BY = #{tSocialSoldierShenBaoTask.createBy} AND a.CREATE_BY = #{tSocialSoldierShenBaoTask.createBy}
</if> </if>
...@@ -82,11 +87,28 @@ ...@@ -82,11 +87,28 @@
</where> </where>
</select> </select>
<!--获取任务id--> <!--获取任务id-->
<select id="getSoldierTaskAddIdByType" resultType="java.lang.String"> <select id="getSoldierTaskAddIdByType" resultMap="tSocialSoldierShenBaoTaskMap">
SELECT SELECT
a.ADD_ID <include refid="Base_Column_List"/>
FROM t_social_soldier_shen_bao_task a FROM t_social_soldier_shen_bao_task a
where a.TYPE = #{type} and a.DATA_STATUS = '0' where a.TYPE = #{type} and a.DATA_STATUS = '0'
ORDER BY a.CREATE_TIME desc limit 1 ORDER BY a.CREATE_TIME desc limit 1
</select> </select>
<!--list-->
<select id="getTSocialSoldierTaskListByRe" resultMap="tSocialSoldierShenBaoTaskMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_social_soldier_shen_bao_task a
where TYPE in ('7','8','9','10')
</select>
<delete id="deleteByPayment">
delete FROM t_social_soldier_shen_bao_task where TYPE in ('3','4','5','6')
</delete>
<delete id="deleteByRePayment">
delete FROM t_social_soldier_shen_bao_task where TYPE in ('7','8','9','10')
</delete>
</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