数据采集-编辑前查看功能
This commit is contained in:
parent
d525c59d6d
commit
317fb5e8ac
|
|
@ -139,4 +139,12 @@ public interface AddUpDeductionService {
|
|||
* @date 2022/10/26 16:35
|
||||
*/
|
||||
void deleteAllAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam);
|
||||
|
||||
/**
|
||||
* @description 获取累计专项附加扣除详情
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 11:33
|
||||
*/
|
||||
AddUpDeductionRecordDTO getAddUpDeduction(AddUpDeductionQueryParam id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,4 +107,12 @@ public interface AddUpSituationService {
|
|||
* @date 2022/10/27 22:35
|
||||
*/
|
||||
void deleteAllAddUpSituation(AddUpDeductionRecordDeleteParam deleteParam);
|
||||
|
||||
/**
|
||||
* @description 获取往期累计情况
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 14:00
|
||||
*/
|
||||
AddUpSituationRecordDTO getAddUpSituation(AddUpSituationParam addUpSituationParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,4 +86,10 @@ public interface AttendQuoteDataService {
|
|||
* @param attendQuoteDataEditParam
|
||||
*/
|
||||
void editData(AttendQuoteDataEditParam attendQuoteDataEditParam);
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
* @param attendQuoteDataEditParam
|
||||
*/
|
||||
Map<String, Object> getData(AttendQuoteDataEditParam attendQuoteDataEditParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,4 +108,9 @@ public interface OtherDeductionService {
|
|||
* 一键清空数据
|
||||
*/
|
||||
void deleteAllData(AddUpDeductionRecordDeleteParam deleteParam);
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
OtherDeductionRecordDTO getOtherDeduction(OtherDeductionParam otherDeductionParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -609,6 +609,26 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
addUpDeductionBiz.batchDeleteByIDS(deleteIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddUpDeductionRecordDTO getAddUpDeduction(AddUpDeductionQueryParam param) {
|
||||
long uid = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(uid);
|
||||
List<String> taxAgentNames = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(param.getId());
|
||||
AddUpDeductionQueryParam build = AddUpDeductionQueryParam.builder().ids(ids).build();
|
||||
List<AddUpDeductionRecordDTO> addUpDeductionRecordDTOS = new AddUpDeductionBiz().recordList(build);
|
||||
if(addUpDeductionRecordDTOS==null || addUpDeductionRecordDTOS.size()==0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
String taxAgentName = addUpDeductionRecordDTOS.get(0).getTaxAgentName();
|
||||
if(!taxAgentNames.contains(taxAgentName)){
|
||||
throw new SalaryRunTimeException("您无权查看该数据!");
|
||||
}
|
||||
return addUpDeductionRecordDTOS.get(0);
|
||||
}
|
||||
|
||||
|
||||
private void checkImportParam(AddUpDeductionImportParam importParam) {
|
||||
|
||||
|
|
|
|||
|
|
@ -1102,6 +1102,26 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
biz.batchDeleteByIDS(deleteIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddUpSituationRecordDTO getAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
long uid = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(uid);
|
||||
List<String> taxAgentNames = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(addUpSituationParam.getId());
|
||||
AddUpSituationQueryParam build = AddUpSituationQueryParam.builder().ids(ids).build();
|
||||
List<AddUpSituationRecordDTO> list = biz.recordList(build);
|
||||
if(list == null || list.size()==0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
String taxAgentName = list.get(0).getTaxAgentName();
|
||||
if(!taxAgentNames.contains(taxAgentName)){
|
||||
throw new SalaryRunTimeException("您无权查看该数据!");
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchSave(List<AddUpSituation> list) {
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ package com.engine.salary.service.impl;
|
|||
import com.alibaba.druid.support.json.JSONUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.*;
|
||||
|
|
@ -810,6 +813,51 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 14:12
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(attendQuoteDataEditParam.getId());
|
||||
AttendQuoteDataQueryParam build = AttendQuoteDataQueryParam.builder().ids(ids).build();
|
||||
List<AttendQuoteDataBaseDTO> list = dataBiz.list(build);
|
||||
if(list==null || list.size()==0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
// 所有考勤字段
|
||||
List<AttendQuoteFieldPO> attendQuoteFields = getAllAttendQuoteFields();
|
||||
// 获取最终结果
|
||||
List<Map<String, Object>> listMaps = getListMaps(list);
|
||||
List<WeaTableColumn> columns = new ArrayList<>();
|
||||
columns.add(new WeaTableColumn("150", SalaryI18nUtil.getI18nLabel(85429, "姓名"), "username"));
|
||||
columns.add(new WeaTableColumn("150", SalaryI18nUtil.getI18nLabel(86185, "部门"), "departmentName"));
|
||||
columns.add(new WeaTableColumn("150", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
|
||||
columns.add(new WeaTableColumn("150", SalaryI18nUtil.getI18nLabel(86317, "工号"), "jobNum"));
|
||||
|
||||
// 动态列
|
||||
if (CollectionUtils.isNotEmpty(listMaps)) {
|
||||
Map<String, Object> map = listMaps.stream().max(Comparator.comparingInt(m -> m.keySet().size())).get();
|
||||
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
|
||||
if (map.containsKey(attendQuoteField.getId() + "_attendQuoteData")) {
|
||||
columns.add(new WeaTableColumn("150", attendQuoteField.getFieldName(), attendQuoteField.getId() + "_attendQuoteData"));
|
||||
}
|
||||
}
|
||||
}
|
||||
WeaTable weaTable = new WeaTable();
|
||||
weaTable.setColumns(columns);
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(weaTable.makeDataResult());
|
||||
result.success();
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
datas.put("data",listMaps.get(0));
|
||||
datas.put("dataKey", result.getResultMap());
|
||||
return datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取金额数字值
|
||||
*
|
||||
|
|
|
|||
|
|
@ -763,6 +763,28 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
otherDeductionBiz.batchDeleteByIDS(deleteIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtherDeductionRecordDTO getOtherDeduction(OtherDeductionParam otherDeductionParam) {
|
||||
long uid = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(uid);
|
||||
List<String> taxAgentNames = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(otherDeductionParam.getId());
|
||||
OtherDeductionQueryParam build = OtherDeductionQueryParam.builder().ids(ids).build();
|
||||
List<OtherDeductionRecordDTO> list = getOtherDeductionMapper().recordList(build);
|
||||
OtherDeductionRecordDTOEncrypt.decryptOtherDeductionRecordDTOList(list);
|
||||
|
||||
if(list==null || list.size()==0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
String taxAgentName = list.get(0).getTaxAgentName();
|
||||
if(!taxAgentNames.contains(taxAgentName)){
|
||||
throw new SalaryRunTimeException("您无权查看该数据!");
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook downloadTemplate(OtherDeductionQueryParam param) {
|
||||
// 1.工作簿名称
|
||||
|
|
|
|||
|
|
@ -273,6 +273,20 @@ public class AddUpDeductionController {
|
|||
return new ResponseResult<AddUpDeductionRecordParam, Map<String, Object>>(user).run(getAddUpDeductionWrapper(user)::createAddUpDeduction, addUpDeduction);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取累计专项附加扣除信息
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 11:23
|
||||
*/
|
||||
@POST
|
||||
@Path("/getAddUpDeduction")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getAddUpDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionQueryParam, AddUpDeductionRecordDTO>(user).run(getAddUpDeductionWrapper(user)::getAddUpDeduction, param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 编辑累计专项附加扣除
|
||||
|
|
|
|||
|
|
@ -287,6 +287,20 @@ public class AddUpSituationController {
|
|||
return new ResponseResult<AddUpSituationParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::editAddUpSituation, addUpSituation);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取往期累计情况
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 13:59
|
||||
*/
|
||||
@POST
|
||||
@Path("/getAddUpSituation")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationParam addUpSituation) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpSituationParam,AddUpSituationRecordDTO>(user).run(getAddUpSituationWrapper(user)::getAddUpSituation, addUpSituation);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 新建数据
|
||||
* @return String
|
||||
|
|
|
|||
|
|
@ -208,6 +208,15 @@ public class AttendQuoteController {
|
|||
return new ResponseResult<AttendQuoteDataQueryParam, Map<String, Object>>(user).run(getAttendQuoteDataWrapper(user)::view, queryParam);
|
||||
}
|
||||
|
||||
|
||||
@POST
|
||||
@Path("/getData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getData(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AttendQuoteDataEditParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AttendQuoteDataEditParam, Map<String, Object>>(user).run(getAttendQuoteDataWrapper(user)::getData, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑考勤数据
|
||||
*
|
||||
|
|
@ -344,6 +353,7 @@ public class AttendQuoteController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改考勤字段
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -290,6 +290,20 @@ public class OtherDeductionController {
|
|||
return new ResponseResult<OtherDeductionParam, Map<String, Object>>(user).run(getOtherDeductionWrapper(user)::editData, otherDeductionParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取其他免税扣除数据
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 13:42
|
||||
*/
|
||||
@POST
|
||||
@Path("/getData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getOtherDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody OtherDeductionParam otherDeductionParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<OtherDeductionParam, OtherDeductionRecordDTO>(user).run(getOtherDeductionWrapper(user)::getOtherDeduction, otherDeductionParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 新建其他免税扣除
|
||||
* @return String
|
||||
|
|
|
|||
|
|
@ -158,4 +158,8 @@ public class AddUpDeductionWrapper extends Service {
|
|||
public void deleteAllAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
getAddUpDeductionService(user).deleteAllAddUpDeduction(deleteParam);
|
||||
}
|
||||
|
||||
public AddUpDeductionRecordDTO getAddUpDeduction(AddUpDeductionQueryParam param) {
|
||||
return getAddUpDeductionService(user).getAddUpDeduction(param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,4 +169,14 @@ public class AddUpSituationWrapper extends Service {
|
|||
public void deleteAllAddUpSituation(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
getAddUpSituationService(user).deleteAllAddUpSituation(deleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取往期累计情况
|
||||
* @return null
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 14:00
|
||||
*/
|
||||
public AddUpSituationRecordDTO getAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
return getAddUpSituationService(user).getAddUpSituation(addUpSituationParam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,4 +149,11 @@ public class AttendQuoteDataWrapper extends Service {
|
|||
public void editData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
getAttendQuoteDataService(user).editData(attendQuoteDataEditParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
public Map<String, Object> getData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
return getAttendQuoteDataService(user).getData(attendQuoteDataEditParam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,4 +235,11 @@ public class OtherDeductionWrapper extends Service {
|
|||
public void deleteAllData(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
getOtherDeductionService(user).deleteAllData(deleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
public OtherDeductionRecordDTO getOtherDeduction(OtherDeductionParam otherDeductionParam) {
|
||||
return getOtherDeductionService(user).getOtherDeduction(otherDeductionParam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue