5、薪资账套中编辑账套增加所属城市;薪资核算页面中增加所属城市且可以通过所有城市进行筛选

This commit is contained in:
dxfeng 2025-12-31 11:05:15 +08:00
parent a3a7d773a8
commit c35b323736
21 changed files with 78 additions and 1 deletions

View File

@ -0,0 +1,3 @@
alter table hrsa_salary_sob add city varchar2(200) null;
/

View File

@ -0,0 +1,3 @@
alter table hrsa_salary_sob add city varchar2(200) null;
/

View File

@ -0,0 +1,3 @@
alter table hrsa_salary_sob add city varchar2(200) null;
/

View File

@ -0,0 +1 @@
alter table hrsa_salary_sob add city varchar(200) null;

View File

@ -0,0 +1,2 @@
alter table hrsa_salary_sob add city varchar2(200) null
/

View File

@ -0,0 +1 @@
alter table hrsa_salary_sob add city varchar(200) null;

View File

@ -0,0 +1,2 @@
alter table hrsa_salary_sob add city varchar(200) null
GO

View File

@ -0,0 +1,3 @@
alter table hrsa_salary_sob add city varchar2(200) null;
/

View File

@ -19,6 +19,7 @@ import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils; import org.apache.commons.lang3.math.NumberUtils;
import weaver.hrm.city.CityComInfo;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -59,6 +60,7 @@ public class SalaryAcctRecordBO {
Map<Long, Long> empSizeMap = SalaryEntityUtil.convert2Map(salaryAcctEmployeeCountDTOS, SalaryAcctEmployeeCountDTO::getSalaryAcctRecordId, SalaryAcctEmployeeCountDTO::getCountBySalaryAcctRecordId); Map<Long, Long> empSizeMap = SalaryEntityUtil.convert2Map(salaryAcctEmployeeCountDTOS, SalaryAcctEmployeeCountDTO::getSalaryAcctRecordId, SalaryAcctEmployeeCountDTO::getCountBySalaryAcctRecordId);
Map<Long, Boolean> salarySendMap = SalaryEntityUtil.convert2Map(salarySendCheckResult, SalarySendCheckDTO::getSalaryAcctId, SalarySendCheckDTO::isSendFinished); Map<Long, Boolean> salarySendMap = SalaryEntityUtil.convert2Map(salarySendCheckResult, SalarySendCheckDTO::getSalaryAcctId, SalarySendCheckDTO::isSendFinished);
Map<Long, String> taxAgentMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId, TaxAgentPO::getName); Map<Long, String> taxAgentMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId, TaxAgentPO::getName);
CityComInfo cityComInfo = new CityComInfo();
return salaryAcctRecordPOS.stream() return salaryAcctRecordPOS.stream()
.map(salaryAcctRecordPO -> { .map(salaryAcctRecordPO -> {
SalarySobPO salarySobPO = salarySobMap.get(salaryAcctRecordPO.getSalarySobId()); SalarySobPO salarySobPO = salarySobMap.get(salaryAcctRecordPO.getSalarySobId());
@ -109,6 +111,7 @@ public class SalaryAcctRecordBO {
.approvalStatus(salaryAcctRecordPO.getApprovalStatus()) .approvalStatus(salaryAcctRecordPO.getApprovalStatus())
.runStatus(salaryAcctRecordPO.getRunStatus()) .runStatus(salaryAcctRecordPO.getRunStatus())
.operate(btnList) .operate(btnList)
.city(cityComInfo.getCityname(salarySobPO.getCity()))
.opts(salaryAcctRecordPO.getOpts()) .opts(salaryAcctRecordPO.getOpts())
.build(); .build();
}).collect(Collectors.toList()); }).collect(Collectors.toList());

View File

@ -64,6 +64,9 @@ public class SalaryAcctRecordListDTO {
@TableTitle(title = "备注", dataIndex = "description", key = "description") @TableTitle(title = "备注", dataIndex = "description", key = "description")
private String description; private String description;
@TableTitle(title = "所属城市", dataIndex = "city", key = "city")
private String city;
@TableTitle(title = "审批状态", dataIndex = "approvalStatus", key = "approvalStatus") @TableTitle(title = "审批状态", dataIndex = "approvalStatus", key = "approvalStatus")
private String approvalStatus; private String approvalStatus;

View File

@ -37,6 +37,8 @@ public class SalaryAcctRecordQueryParam extends BaseQueryParam {
*/ */
private List<Long> taxAgentIds; private List<Long> taxAgentIds;
private List<Long> cityIds;
private String startMonthStr; private String startMonthStr;
private String endMonthStr; private String endMonthStr;

View File

@ -167,6 +167,8 @@ public class SalaryAcctRecordPO {
//薪资账套id //薪资账套id
Collection<Long> salarySobIds; Collection<Long> salarySobIds;
Collection<Long> cityIds;
//税款所属期 //税款所属期
LocalDateRange salaryMonths; LocalDateRange salaryMonths;

View File

@ -1,6 +1,7 @@
package com.engine.salary.entity.salarysob.dto; package com.engine.salary.entity.salarysob.dto;
import com.engine.salary.component.WeaFormOption; import com.engine.salary.component.WeaFormOption;
import com.engine.salary.entity.hrm.RoleInfo;
import com.engine.salary.enums.SalaryCycleTypeEnum; import com.engine.salary.enums.SalaryCycleTypeEnum;
import com.engine.salary.enums.SalarySobStatusEnum; import com.engine.salary.enums.SalarySobStatusEnum;
import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
@ -51,6 +52,8 @@ public class SalarySobBasicFormDTO {
*/ */
private Integer taxableItems; private Integer taxableItems;
private List<RoleInfo> cityData;
/** /**
* 薪资周期 * 薪资周期
* @see SalaryCycleTypeEnum * @see SalaryCycleTypeEnum

View File

@ -59,6 +59,10 @@ public class SalarySobListDTO {
@SalaryTableColumn(text = "薪资周期起始日期", width = "10%", column = "salaryCycleFromDay", display = false) @SalaryTableColumn(text = "薪资周期起始日期", width = "10%", column = "salaryCycleFromDay", display = false)
private String salaryCycleFromDay; private String salaryCycleFromDay;
@SalaryTableColumn(text = "所属城市", width = "10%", column = "city")
@TableTitle(title = "所属城市", key = "city", dataIndex = "city")
private String city;
@SalaryTableColumn(text = "启用", width = "10%", column = "disable") @SalaryTableColumn(text = "启用", width = "10%", column = "disable")
@TableTitle(title = "启用", key = "disable", dataIndex = "disable") @TableTitle(title = "启用", key = "disable", dataIndex = "disable")
private Integer disable; private Integer disable;

View File

@ -97,4 +97,9 @@ public class SalarySobBasicSaveParam {
*/ */
@DataCheck(max = 80, message = "备注不能超过80个字符") @DataCheck(max = 80, message = "备注不能超过80个字符")
private String description; private String description;
/**
* 所属城市
*/
private String city;
} }

View File

@ -182,6 +182,12 @@ public class SalarySobPO {
@XStreamAsAttribute @XStreamAsAttribute
private String tenantKey; private String tenantKey;
@ElogTransform( name="所属城市" )
@XStreamAlias("city")
@XStreamAsAttribute
private String city;
Collection<Long> ids; Collection<Long> ids;

View File

@ -135,6 +135,12 @@
#{salarySobId} #{salarySobId}
</foreach> </foreach>
</if> </if>
<if test="cityIds != null and cityIds.size()>0">
AND t.city IN
<foreach collection="cityIds" open="(" item="city" separator="," close=")">
#{city}
</foreach>
</if>
<if test="salaryMonths != null and salaryMonths.fromDate != null"> <if test="salaryMonths != null and salaryMonths.fromDate != null">
AND t.salary_month <![CDATA[ >= ]]> #{salaryMonths.fromDate} AND t.salary_month <![CDATA[ >= ]]> #{salaryMonths.fromDate}
</if> </if>

View File

@ -19,6 +19,7 @@
<result column="delete_type" property="deleteType"/> <result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/> <result column="tenant_key" property="tenantKey"/>
<result column="tax_agent_id" property="taxAgentId"/> <result column="tax_agent_id" property="taxAgentId"/>
<result column="city" property="city"/>
<collection property="taxAgentIds" ofType="long" > <collection property="taxAgentIds" ofType="long" >
<constructor> <constructor>
<arg column="taxAgentId"/> <arg column="taxAgentId"/>
@ -47,6 +48,7 @@
, t.delete_type , t.delete_type
, t.tenant_key , t.tenant_key
, t.tax_agent_id , t.tax_agent_id
, t.city
, l.tax_agent_id as taxAgentId , l.tax_agent_id as taxAgentId
</sql> </sql>
@ -198,6 +200,9 @@
<if test="taxAgentId != null"> <if test="taxAgentId != null">
tax_agent_id, tax_agent_id,
</if> </if>
<if test="city != null">
city,
</if>
</trim> </trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=","> <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -251,6 +256,9 @@
<if test="taxAgentId != null"> <if test="taxAgentId != null">
#{taxAgentId}, #{taxAgentId},
</if> </if>
<if test="city != null">
#{city},
</if>
</trim> </trim>
</insert> </insert>
@ -315,6 +323,9 @@
<if test="taxAgentId != null"> <if test="taxAgentId != null">
tax_agent_id, tax_agent_id,
</if> </if>
<if test="city != null">
city,
</if>
</trim> </trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=","> <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -368,6 +379,9 @@
<if test="taxAgentId != null"> <if test="taxAgentId != null">
#{taxAgentId}, #{taxAgentId},
</if> </if>
<if test="city != null">
#{city},
</if>
</trim> </trim>
</insert> </insert>
@ -447,6 +461,9 @@
<if test="taxAgentId != null"> <if test="taxAgentId != null">
tax_agent_id=#{taxAgentId}, tax_agent_id=#{taxAgentId},
</if> </if>
<if test="city != null">
city=#{city},
</if>
</set> </set>
WHERE id = #{id} AND delete_type = 0 WHERE id = #{id} AND delete_type = 0
</update> </update>

View File

@ -117,6 +117,7 @@ public class SalarySobInitServiceImpl extends AbstractSalarySobInitService {
.setSocialSecurityCycleType(saveParam.getSocialSecurityCycleType()) .setSocialSecurityCycleType(saveParam.getSocialSecurityCycleType())
.setDisable(0) .setDisable(0)
.setDescription(saveParam.getDescription()) .setDescription(saveParam.getDescription())
.setCity(saveParam.getCity())
// .setOriginSalarySobId(saveParam.getId()) // .setOriginSalarySobId(saveParam.getId())
.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) .setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.setCreator((long) env.getCurrentUser().getUID()) .setCreator((long) env.getCurrentUser().getUID())

View File

@ -575,6 +575,7 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
.setAttendCycleFromDay(saveParam.getAttendCycleFromDay()) .setAttendCycleFromDay(saveParam.getAttendCycleFromDay())
.setSocialSecurityCycleType(saveParam.getSocialSecurityCycleType()) .setSocialSecurityCycleType(saveParam.getSocialSecurityCycleType())
.setDescription(saveParam.getDescription()) .setDescription(saveParam.getDescription())
.setCity(saveParam.getCity())
.setUpdateTime(new Date()); .setUpdateTime(new Date());
salarySobMapper.updateById(newSalarySobPO); salarySobMapper.updateById(newSalarySobPO);

View File

@ -1,8 +1,10 @@
package com.engine.salary.wrapper; package com.engine.salary.wrapper;
import cn.hutool.core.convert.Convert;
import com.engine.common.util.ServiceUtil; import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service; import com.engine.core.impl.Service;
import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.entity.hrm.RoleInfo;
import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO; import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.entity.salaryitem.po.SysSalaryItemPO; import com.engine.salary.entity.salaryitem.po.SysSalaryItemPO;
@ -31,6 +33,7 @@ import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.PageInfo;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import weaver.hrm.User; import weaver.hrm.User;
import weaver.hrm.city.CityComInfo;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -92,7 +95,7 @@ public class SalarySobWrapper extends Service {
PageInfo<SalarySobPO> page = getSalarySobService(user).listPageByParam(queryParam); PageInfo<SalarySobPO> page = getSalarySobService(user).listPageByParam(queryParam);
// 薪资账套po转换成薪资账套列表dto // 薪资账套po转换成薪资账套列表dto
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAll(); List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAll();
CityComInfo cityComInfo = new CityComInfo();
List<SalarySobListDTO> salarySobListDTOS = page.getList().stream() List<SalarySobListDTO> salarySobListDTOS = page.getList().stream()
.map(salarySobPO -> { .map(salarySobPO -> {
@ -105,6 +108,7 @@ public class SalarySobWrapper extends Service {
.taxAgentIds(taxAgentIds) .taxAgentIds(taxAgentIds)
.salaryCycle(SalarySobBO.buildSalaryCycle(salarySobPO)) .salaryCycle(SalarySobBO.buildSalaryCycle(salarySobPO))
.disable(salarySobPO.getDisable()) .disable(salarySobPO.getDisable())
.city(cityComInfo.getCityname(salarySobPO.getCity()))
.description(salarySobPO.getDescription()) .description(salarySobPO.getDescription())
.opts(salarySobPO.getOpts()) .opts(salarySobPO.getOpts())
.build(); .build();
@ -223,6 +227,8 @@ public class SalarySobWrapper extends Service {
} }
// 薪资装套po转换成薪资账套详情dto // 薪资装套po转换成薪资账套详情dto
basicForm = SalarySobBO.convert2FormDTO(basicForm, salarySobPO); basicForm = SalarySobBO.convert2FormDTO(basicForm, salarySobPO);
String citynameame = new CityComInfo().getCityname(salarySobPO.getCity());
basicForm.setCityData(Collections.singletonList(RoleInfo.builder().id(Convert.toLong(salarySobPO.getCity())).name(citynameame).build()));
} }
// 转换成前端所需的数据格式 // 转换成前端所需的数据格式
data.put("basicForm", basicForm); data.put("basicForm", basicForm);