fix操作记录创建人
This commit is contained in:
parent
cbafca9aab
commit
7a06fc73f4
|
|
@ -60,7 +60,7 @@ public class TaxApiFlowBO {
|
|||
String idNo = propertiesWrapper.getEmpIdNoMap().get(e.getEmployeeId());
|
||||
String externalUsername = propertiesWrapper.getExtEmployeeMap().getOrDefault(e.getEmployeeId(), new ExtEmpPO()).getUsername();
|
||||
String externalIdNo = propertiesWrapper.getExtEmployeeMap().getOrDefault(e.getEmployeeId(), new ExtEmpPO()).getIdNo();
|
||||
String creator = propertiesWrapper.getEmpNameMap().get(e.getCreator());
|
||||
String creator = propertiesWrapper.getCreatorNameMap().get(e.getCreator());
|
||||
String taxAgentName = propertiesWrapper.getTaxAgentNameMap().get(e.getTaxAgentId());
|
||||
|
||||
boolean isInternal = StringUtils.isNotEmpty(internalUsername);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.engine.salary.entity.taxapiflow.param.TaxDeclarationApiFlowWarnConfig
|
|||
import com.engine.salary.entity.taxapiflow.param.TaxDeclarationApiFlowWarnReceiverSaveParam;
|
||||
import com.engine.salary.entity.taxapiflow.po.TaxDeclarationApiFlowWarnConfigPO;
|
||||
import com.engine.salary.service.impl.TaxDeclarationApiBillingServiceImpl;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -35,6 +36,9 @@ public interface TaxDeclarationApiFlowWarnService {
|
|||
*/
|
||||
List<TaxDeclarationApiFlowWarnReceiverListDTO> getWarnReceiverList(Long warnConfigId);
|
||||
|
||||
|
||||
PageInfo<TaxDeclarationApiFlowWarnReceiverListDTO> getWarnReceiverPageList(Long warnConfigId);
|
||||
|
||||
/**
|
||||
* 删除流量不足提醒对象
|
||||
*
|
||||
|
|
|
|||
|
|
@ -105,12 +105,22 @@ public class TaxDeclarationApiBillingServiceImpl extends Service implements TaxD
|
|||
List<DataCollectionEmployee> employeeComInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(new ArrayList<>(employeeTaxAgentMap.keySet()));
|
||||
Map<Long, String> empNameMap = SalaryEntityUtil.convert2Map(employeeComInfos, DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername);
|
||||
Map<Long, String> empIdNoMap = getSalaryEmployeeService(user).mapByEmployeeIds(employeeTaxAgentMap.keySet());
|
||||
|
||||
//非系统人员信息
|
||||
List<ExtEmpPO> extEmployeePOS = getExtEmpService(user).listAll();
|
||||
Map<Long, ExtEmpPO> extEmployeeMap = SalaryEntityUtil.convert2Map(extEmployeePOS, ExtEmpPO::getId);
|
||||
|
||||
// 获取个税扣缴义务人信息
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(new HashSet<>(employeeTaxAgentMap.values()));
|
||||
Map<Long, String> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId, TaxAgentPO::getName);
|
||||
return new TempPropertiesWrapper(empNameMap, empIdNoMap, taxAgentNameMap, extEmployeeMap);
|
||||
|
||||
//创建人信息
|
||||
List<Long> creators = SalaryEntityUtil.properties(list, TaxDeclarationApiFlowRecordPO::getCreator, Collectors.toList());
|
||||
List<DataCollectionEmployee> creatorInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(new ArrayList<>(creators));
|
||||
Map<Long, String> creatorNameMap = SalaryEntityUtil.convert2Map(creatorInfos, DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername);
|
||||
|
||||
return new TempPropertiesWrapper(empNameMap, empIdNoMap, taxAgentNameMap, extEmployeeMap, creatorNameMap);
|
||||
|
||||
}
|
||||
|
||||
private TaxDeclarationApiFlowRecordPO getFlowRecordQueryChainWrapper(TaxDeclarationApiFlowRecordQueryParam queryParam) {
|
||||
|
|
@ -138,6 +148,7 @@ public class TaxDeclarationApiBillingServiceImpl extends Service implements TaxD
|
|||
headers.add(SalaryI18nUtil.getI18nLabel(159085, "接口服务"));
|
||||
headers.add(SalaryI18nUtil.getI18nLabel(85435, "操作人"));
|
||||
headers.add(SalaryI18nUtil.getI18nLabel(159086, "结果"));
|
||||
rows.add(headers);
|
||||
// 获取数据
|
||||
List<TaxDeclarationApiFlowRecordListDTO> dtoList = listFlowRecord(queryParam);
|
||||
// 组装数据
|
||||
|
|
@ -172,6 +183,8 @@ public class TaxDeclarationApiBillingServiceImpl extends Service implements TaxD
|
|||
private Map<Long, String> taxAgentNameMap;
|
||||
// 获取非系统人员
|
||||
private Map<Long, ExtEmpPO> extEmployeeMap;
|
||||
//创建人
|
||||
private Map<Long, String> creatorNameMap;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ import com.engine.salary.util.SalaryAssert;
|
|||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -92,6 +94,12 @@ public class TaxDeclarationApiFlowWarnServiceImpl extends Service implements Tax
|
|||
.build()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<TaxDeclarationApiFlowWarnReceiverListDTO> getWarnReceiverPageList(Long warnConfigId) {
|
||||
List<TaxDeclarationApiFlowWarnReceiverListDTO> dtos = getWarnReceiverList(warnConfigId);
|
||||
return SalaryPageUtil.buildPage(1, 10000, dtos, TaxDeclarationApiFlowWarnReceiverListDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteReceiver(Long id) {
|
||||
|
|
@ -248,6 +256,7 @@ public class TaxDeclarationApiFlowWarnServiceImpl extends Service implements Tax
|
|||
|
||||
/**
|
||||
* 发送邮件
|
||||
*
|
||||
* @param receiver
|
||||
* @param title
|
||||
* @param context
|
||||
|
|
@ -258,6 +267,7 @@ public class TaxDeclarationApiFlowWarnServiceImpl extends Service implements Tax
|
|||
|
||||
/**
|
||||
* 发送Em消息
|
||||
*
|
||||
* @param receiver
|
||||
* @param title
|
||||
* @param context
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public class TaxDeclarationApiFlowController {
|
|||
}
|
||||
String result = request.getParameter("result");
|
||||
if(StringUtils.isNotBlank(result)){
|
||||
queryParam.setBusinessType(Integer.valueOf(result));
|
||||
queryParam.setResult(Integer.valueOf(result));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ package com.engine.salary.web;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import com.engine.salary.entity.taxapiflow.dto.TaxDeclarationApiFlowWarnConfigFormDTO;
|
||||
import com.engine.salary.entity.taxapiflow.dto.TaxDeclarationApiFlowWarnReceiverFormDTO;
|
||||
import com.engine.salary.entity.taxapiflow.dto.TaxDeclarationApiFlowWarnReceiverListDTO;
|
||||
import com.engine.salary.entity.taxapiflow.param.CreateMessageRuleParam;
|
||||
import com.engine.salary.entity.taxapiflow.param.TaxDeclarationApiFlowWarnConfigSaveParam;
|
||||
import com.engine.salary.entity.taxapiflow.param.TaxDeclarationApiFlowWarnReceiverSaveParam;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.wrapper.TaxDeclarationApiFlowWarnWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
|
|
@ -18,7 +20,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能算薪-流量不足提醒
|
||||
|
|
@ -71,7 +72,7 @@ public class TaxDeclarationApiFlowWarnController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getWarnReceiverForm(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationApiFlowWarnReceiverSaveParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<TaxDeclarationApiFlowWarnReceiverSaveParam, String>(user).run(getTaxDeclarationApiFlowWarnWrapper(user)::getWarnReceiverForm, param);
|
||||
return new ResponseResult<TaxDeclarationApiFlowWarnReceiverSaveParam, TaxDeclarationApiFlowWarnReceiverFormDTO>(user).run(getTaxDeclarationApiFlowWarnWrapper(user)::getWarnReceiverForm, param);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -99,7 +100,7 @@ public class TaxDeclarationApiFlowWarnController {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getWarnReceiverList(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "warnConfigId") Long warnConfigId) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Long, List<TaxDeclarationApiFlowWarnReceiverListDTO>>(user).run(getTaxDeclarationApiFlowWarnWrapper(user)::getWarnReceiverList, warnConfigId);
|
||||
return new ResponseResult<Long, PageInfo<TaxDeclarationApiFlowWarnReceiverListDTO>>(user).run(getTaxDeclarationApiFlowWarnWrapper(user)::getWarnReceiverList, warnConfigId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -58,8 +58,7 @@ public class TaxDeclarationApiFlowBillingWrapper extends Service {
|
|||
}
|
||||
|
||||
public PageInfo<TaxDeclarationApiFlowRecordListDTO> getFlowRecord(TaxDeclarationApiFlowRecordQueryParam queryParam) {
|
||||
PageInfo<TaxDeclarationApiFlowRecordListDTO> page = getTaxDeclarationApiBillingService(user).pageFlowRecord(queryParam);
|
||||
return page;
|
||||
return getTaxDeclarationApiBillingService(user).pageFlowRecord(queryParam);
|
||||
}
|
||||
|
||||
public XSSFWorkbook exportFlowRecord(TaxDeclarationApiFlowRecordQueryParam queryParam) {
|
||||
|
|
|
|||
|
|
@ -12,11 +12,10 @@ import com.engine.salary.entity.taxapiflow.po.TaxDeclarationApiFlowWarnConfigPO;
|
|||
import com.engine.salary.enums.SalaryOnOffEnum;
|
||||
import com.engine.salary.service.TaxDeclarationApiFlowWarnService;
|
||||
import com.engine.salary.service.impl.TaxDeclarationApiFlowWarnServiceImpl;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流量不足提醒
|
||||
* <p>Copyright: Copyright (c) 2023</p>
|
||||
|
|
@ -54,9 +53,8 @@ public class TaxDeclarationApiFlowWarnWrapper extends Service {
|
|||
return getTaxDeclarationApiFlowWarnService(user).saveWarnConfig(param);
|
||||
}
|
||||
|
||||
public List<TaxDeclarationApiFlowWarnReceiverListDTO> getWarnReceiverList(Long warnConfigId) {
|
||||
List<TaxDeclarationApiFlowWarnReceiverListDTO> receiverListDTOS = getTaxDeclarationApiFlowWarnService(user).getWarnReceiverList(warnConfigId);
|
||||
return receiverListDTOS;
|
||||
public PageInfo<TaxDeclarationApiFlowWarnReceiverListDTO> getWarnReceiverList(Long warnConfigId) {
|
||||
return getTaxDeclarationApiFlowWarnService(user).getWarnReceiverPageList(warnConfigId);
|
||||
}
|
||||
|
||||
public void deleteReceiver(Long id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue