Merge branch 'feature/qt' into develop
This commit is contained in:
commit
faca2d4d1b
|
|
@ -1,6 +1,9 @@
|
|||
package com.engine.salary.cmd.TaxRate;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableOperate;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableOperates;
|
||||
import com.cloudstore.eccom.pc.table.WeaTablePopedom;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
|
|
@ -67,6 +70,30 @@ public class TaxRateListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|||
table.setCheckboxList(checkboxpopedomList);
|
||||
table.setCheckboxpopedom(null);
|
||||
|
||||
List<WeaTableOperate> operateList = new ArrayList<>();
|
||||
WeaTableOperate editOperate = new WeaTableOperate("编辑", "", "0");
|
||||
// editOperate.setOtherpara("column:system_type");
|
||||
// editOperate.setIsalwaysshow("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom");
|
||||
operateList.add(editOperate);
|
||||
WeaTableOperate deleteOperate = new WeaTableOperate("删除", "", "1");
|
||||
// deleteOperate.setOtherpara("column:system_type");
|
||||
// deleteOperate.setIsalwaysshow("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom");
|
||||
operateList.add(deleteOperate);
|
||||
WeaTableOperate logOperate = new WeaTableOperate("操作日志", "", "3");
|
||||
operateList.add(logOperate);
|
||||
|
||||
WeaTablePopedom popedom = new WeaTablePopedom();
|
||||
popedom.setTransmethod("com.engine.salary.transmethod.TaxRateTransMethod.getOpratePopedomWithType");
|
||||
popedom.setOtherpara("column:system_type");
|
||||
|
||||
|
||||
WeaTableOperates weaTableOperates = new WeaTableOperates();
|
||||
weaTableOperates.setOperate(operateList);
|
||||
weaTableOperates.setPopedom(popedom);
|
||||
table.setOperates(weaTableOperates);
|
||||
|
||||
|
||||
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.engine.salary.entity.salarysob.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import com.engine.salary.util.valid.RuntimeTypeEnum;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
|
@ -15,35 +17,24 @@ import lombok.experimental.Accessors;
|
|||
public class SalarySobCheckRuleSaveParam {
|
||||
|
||||
//主键id")
|
||||
@DataCheck(require = true,runtime = RuntimeTypeEnum.UPDATE,message = "ID不允许为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 薪资账套的ID不允许为空
|
||||
*/
|
||||
//@NotNull(message = "LABEL:86575")
|
||||
//薪资账套id")
|
||||
|
||||
//薪资账套id
|
||||
@DataCheck(require = true, message = "薪资账套的ID不允许为空")
|
||||
private Long salarySobId;
|
||||
|
||||
/**
|
||||
* 名称不允许为空
|
||||
*/
|
||||
//@NotEmpty(message = "LABEL:85607")
|
||||
//@Length(max = 40, message = "LABEL:98177")
|
||||
//规则名称")
|
||||
//规则名称
|
||||
@DataCheck(require = true,max = 40, message = "名称不允许为空且最大字符不超过40")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 校验规则公式不允许为空
|
||||
*/
|
||||
//@NotNull(message = "LABEL:98647")
|
||||
|
||||
//公式id")
|
||||
//公式id
|
||||
@DataCheck(require = true, message = "校验规则公式不允许为空")
|
||||
private Long formulaId;
|
||||
|
||||
/**
|
||||
* 备注不能超过80个字符
|
||||
*/
|
||||
//@Length(max = 80, message = "LABEL:98588")
|
||||
//备注")
|
||||
//备注
|
||||
@DataCheck(max = 80, message = "备注不能超过80个字符")
|
||||
private String description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.salarysob.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -18,17 +19,12 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
public class UpdateCheckRuleFormulaParam {
|
||||
|
||||
/**
|
||||
* 校验规则ID不能为空
|
||||
*/
|
||||
//@NotNull(message = "LABEL:98648")
|
||||
//校验规则的id")
|
||||
|
||||
//校验规则的id
|
||||
@DataCheck(require = true,message = "校验规则ID不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 校验规则公式能为空
|
||||
*/
|
||||
//@NotNull(message = "LABEL:98647")
|
||||
//校验规则的公式id")
|
||||
//校验规则的公式id
|
||||
@DataCheck(require = true,message = "校验规则公式能为空")
|
||||
private Long formulaId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.engine.salary.entity.taxrate.vo;
|
|||
|
||||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.SalaryTableOperate;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -21,14 +20,9 @@ import lombok.NoArgsConstructor;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SalaryTable(pageId = "a4f85287-e3f9-4275-9527-1206e54y6rj8",
|
||||
fields = " create_time,creator,delete_type, description, id, name, system_type, tenant_key, update_time",
|
||||
fields = "id, name, system_type, description, create_time,creator,delete_type, tenant_key, update_time",
|
||||
orderby = "id desc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@SalaryTableOperate(text = "编辑", index = "0"),
|
||||
@SalaryTableOperate(text = "删除", index = "1"),
|
||||
@SalaryTableOperate(text = "操作日志", index = "2")
|
||||
}
|
||||
primarykey = "id"
|
||||
)
|
||||
public class TaxRateTableVO {
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ alter table hrsa_salary_sob_range modify id bigint auto_increment;
|
|||
alter table hrsa_salary_sob_item_group modify id bigint auto_increment;
|
||||
alter table hrsa_salary_sob_emp_field modify id bigint auto_increment;
|
||||
alter table hrsa_salary_sob_adjust_rule modify id bigint auto_increment;
|
||||
alter table hrsa_salary_sob_check_rule modify id bigint auto_increment;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@
|
|||
<update id="deleteByIds">
|
||||
UPDATE hrsa_salary_sob_check_rule
|
||||
SET delete_type = 1
|
||||
WHERE tenant_key = #{tenantKey} AND delete_type = 0
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import com.engine.salary.service.SalarySobCheckRuleService;
|
|||
import com.engine.salary.service.SalarySobService;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.valid.RuntimeTypeEnum;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -29,9 +31,9 @@ import java.util.*;
|
|||
**/
|
||||
public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobCheckRuleService {
|
||||
|
||||
private SalarySobCheckRuleBiz salarySobCheckRuleMapper;
|
||||
private SalarySobCheckRuleBiz salarySobCheckRuleMapper = new SalarySobCheckRuleBiz();
|
||||
private SalarySobService getSalarySobService(User user) {
|
||||
return (SalarySobService) ServiceUtil.getService(AttendQuoteFieldSettingServiceImpl.class, user);
|
||||
return (SalarySobService) ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||
}
|
||||
// private LoggerTemplate salarySobLoggerTemplate;
|
||||
|
||||
|
|
@ -71,6 +73,8 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC
|
|||
|
||||
@Override
|
||||
public void save(SalarySobCheckRuleSaveParam saveParam) {
|
||||
ValidUtil.doValidator(saveParam);
|
||||
|
||||
// 查询薪资账套的校验规则
|
||||
List<SalarySobCheckRulePO> salarySobCheckRulePOS = listBySalarySobIdAndName(saveParam.getSalarySobId(), saveParam.getName());
|
||||
if (CollectionUtils.isNotEmpty(salarySobCheckRulePOS)) {
|
||||
|
|
@ -103,6 +107,9 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC
|
|||
|
||||
@Override
|
||||
public void update(SalarySobCheckRuleSaveParam updateParam) {
|
||||
|
||||
ValidUtil.doValidator(updateParam, RuntimeTypeEnum.UPDATE);
|
||||
|
||||
// 名称不允许重复
|
||||
List<SalarySobCheckRulePO> salarySobCheckRulePOS = listBySalarySobIdAndName(updateParam.getSalarySobId(), updateParam.getName());
|
||||
boolean nameExist = salarySobCheckRulePOS.stream().anyMatch(salarySobCheckRulePO -> !Objects.equals(salarySobCheckRulePO.getId(), updateParam.getId()));
|
||||
|
|
@ -140,6 +147,8 @@ public class SalarySobCheckRuleServiceImpl extends Service implements SalarySobC
|
|||
|
||||
@Override
|
||||
public void updateFormulaId(UpdateCheckRuleFormulaParam updateParam) {
|
||||
ValidUtil.doValidator(updateParam);
|
||||
|
||||
// 查询薪资账套的校验规则
|
||||
SalarySobCheckRulePO salarySobCheckRulePO = getById(updateParam.getId());
|
||||
if (Objects.isNull(salarySobCheckRulePO)) {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,10 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
}
|
||||
|
||||
private SalaryFormulaService salaryFormulaService;
|
||||
private SalaryItemService salaryItemService;
|
||||
|
||||
private SalaryItemService getSalaryItemService(User user) {
|
||||
return (SalaryItemService) ServiceUtil.getService(SalaryItemServiceImpl.class, user);
|
||||
}
|
||||
// private LoggerTemplate salarySobLoggerTemplate;
|
||||
|
||||
@Override
|
||||
|
|
@ -90,7 +93,7 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
}
|
||||
// 查询薪资项目
|
||||
Set<Long> salaryItemIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getSalaryItemId);
|
||||
return salaryItemService.listByIds(salaryItemIds);
|
||||
return getSalaryItemService(user).listByIds(salaryItemIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -108,11 +111,12 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
List<SalarySobItemPO> salarySobItemPOS = listBySalarySobId(salarySobId);
|
||||
// 薪资账套的薪资项目副本所用的公式id
|
||||
Set<Long> formulaIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getFormulaId);
|
||||
// 查询公式详情
|
||||
List<ExpressFormula> expressFormulas = salaryFormulaService.listExpressFormula(formulaIds);
|
||||
// 查询公式详情 todo
|
||||
// List<ExpressFormula> expressFormulas = salaryFormulaService.listExpressFormula(formulaIds);
|
||||
List<ExpressFormula> expressFormulas = new ArrayList<>();
|
||||
// 查询薪资账套的薪资项目副本所关联的薪资项目
|
||||
Set<Long> salaryItemIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getSalaryItemId);
|
||||
List<SalaryItemPO> salaryItemPOS = salaryItemService.listByIds(salaryItemIds);
|
||||
List<SalaryItemPO> salaryItemPOS = getSalaryItemService(user).listByIds(salaryItemIds);
|
||||
// 转换成聚合dto
|
||||
SalarySobItemAggregateBO salarySobItemAggregateBO = new SalarySobItemAggregateBO(salarySobPO, salarySobEmpFieldPOS,
|
||||
salarySobItemGroupPOS, salarySobItemPOS, expressFormulas, salaryItemPOS);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
package com.engine.salary.transmethod;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class TaxRateTransMethod {
|
||||
public static String getSystemTypeName(String type) {
|
||||
switch (type) {
|
||||
|
|
@ -18,4 +22,24 @@ public class TaxRateTransMethod {
|
|||
else
|
||||
return "true";
|
||||
}
|
||||
|
||||
/**
|
||||
* @description :操作的显示隐藏
|
||||
*/
|
||||
public static ArrayList getOpratePopedomWithType(String type) throws Exception {
|
||||
ArrayList returnList = new ArrayList();
|
||||
String edit = "true";
|
||||
String delete = "true";
|
||||
String log = "true";
|
||||
|
||||
|
||||
if(StringUtils.equals(type, "1")){
|
||||
edit = "false";//启用状态显示禁用
|
||||
delete = "false";
|
||||
}
|
||||
returnList.add(edit);
|
||||
returnList.add(delete);
|
||||
returnList.add(log);
|
||||
return returnList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ public class SalarySobController {
|
|||
/**
|
||||
* 薪资账套校验规则表单
|
||||
*/
|
||||
@POST
|
||||
@GET
|
||||
@Path("/checkrule/getForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue