维护工具
This commit is contained in:
parent
598ff0cf9a
commit
c94d5169f0
|
|
@ -48,9 +48,9 @@ public class MaintainerController {
|
|||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/template/list")
|
||||
@Path("/acct/supplement")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String templateList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctSupplementParam queryParam) {
|
||||
public String supplementAcctRecord(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctSupplementParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryAcctSupplementParam, Map<String, Object>>(user).run(getSalaryAcctManager(user)::supplementAcctRecord, queryParam);
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ public class MaintainerController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String recoverAddUpSituationHistoryData(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult< Map<String, Object>, String >(user).run(getAddUpSituationManager(user)::recoverAddUpHistoryData);
|
||||
return new ResponseResult< Map<String, Object>, Boolean >(user).run(getAddUpSituationManager(user)::recoverAddUpHistoryData);
|
||||
}
|
||||
//---------------------------数据采集 往期累计情况 end ------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class AddUpSituationManager extends Service {
|
|||
return ServiceUtil.getService(TaxDeclarationServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public String recoverAddUpHistoryData() {
|
||||
public boolean recoverAddUpHistoryData() {
|
||||
// 获取已有的个税申报表记录
|
||||
List<TaxDeclarationPO> taxDeclarationList = getTaxDeclarationMapper().listSome(new TaxDeclarationPO());
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
|
|
@ -43,22 +43,24 @@ public class AddUpSituationManager extends Service {
|
|||
List<Long> taxDeclarationIds = taxDeclarationList.stream().map(TaxDeclarationPO::getId).collect(Collectors.toList());
|
||||
bb.writeLog("往期累计数据恢复DataIds:"+ taxDeclarationIds);
|
||||
bb.writeLog("往期累计数据恢复DataMap:"+ taxDeclarationMap);
|
||||
boolean result = true;
|
||||
// 循环调用生成申报单接口
|
||||
for(int i =0; i < taxDeclarationList.size(); i++){
|
||||
TaxDeclarationPO PO = taxDeclarationList.get(i);
|
||||
bb.writeLog("开始删除生成:"+PO.getTaxAgentId()+"-"+PO.getSalaryMonth());
|
||||
TaxDeclarationPO po = taxDeclarationList.get(i);
|
||||
bb.writeLog("开始删除生成:"+po.getTaxAgentId()+"-"+po.getSalaryMonth());
|
||||
// 删除记录
|
||||
int delete = getTaxDeclarationMapper().deleteByIdZj(PO.getId());
|
||||
LocalDate localDate = SalaryDateUtil.dateToLocalDate(PO.getSalaryMonth());
|
||||
int delete = getTaxDeclarationMapper().deleteByIdZj(po.getId());
|
||||
LocalDate localDate = SalaryDateUtil.dateToLocalDate(po.getSalaryMonth());
|
||||
// 调用生成申报单接口
|
||||
YearMonth yearMonth = YearMonth.of(localDate.getYear(),localDate.getMonth());
|
||||
try {
|
||||
getTaxDeclarationService().save(TaxDeclarationSaveParam.builder().salaryMonth(yearMonth).taxAgentId(PO.getTaxAgentId()).build());
|
||||
getTaxDeclarationService().save(TaxDeclarationSaveParam.builder().salaryMonth(yearMonth).taxAgentId(po.getTaxAgentId()).build());
|
||||
}catch (Exception e){
|
||||
bb.writeLog("错误:"+e);
|
||||
result = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return "SUCCESS";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@
|
|||
|
||||
<update id="deleteByIdZj">
|
||||
UPDATE hrsa_tax_declaration
|
||||
SET delete_type = 1,
|
||||
update_time ='2023-01-01'
|
||||
SET delete_type = 3
|
||||
WHERE delete_type = 0
|
||||
AND id = #{id}
|
||||
</update>
|
||||
|
|
|
|||
Loading…
Reference in New Issue