commit
This commit is contained in:
@@ -266,6 +266,11 @@ public class Sys_user extends BaseModel implements Serializable {
|
||||
@DataCenterColumn(name = "单位", key = "SZDWH")
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("三级单位ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String threeUnitId;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unitPath;
|
||||
|
||||
+2
-2
@@ -262,7 +262,7 @@ public class HonorManageController {
|
||||
excelExportEntity.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("奖项", "prize", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("荣誉级别", "honorLevel", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("荣誉类别", "honorLevel", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("授予单位", "grantUnit", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("授予时间", "grantDate", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("奖项介质", "awardType", 20));
|
||||
@@ -276,7 +276,7 @@ public class HonorManageController {
|
||||
excelExportEntity.add(new ExcelExportEntity("会员人数", "memberNumber", 10));
|
||||
excelExportEntity.add(new ExcelExportEntity("工会小组数", "unionGroupNumber", 10));
|
||||
excelExportEntity.add(new ExcelExportEntity("奖项", "prize", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("荣誉级别", "honorLevel", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("荣誉类别", "honorLevel", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("授予单位", "grantUnit", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("参加比赛名称", "gameName", 20));
|
||||
excelExportEntity.add(new ExcelExportEntity("授予时间", "grantDate", 20));
|
||||
|
||||
+7
@@ -124,6 +124,13 @@ public class UnionReimburseCollectController {
|
||||
return unionReimburseService.updateActuallyAmount(id, realMoney);
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR)
|
||||
public Result updateReimburseProject(String id, String reimburseProject) {
|
||||
return unionReimburseService.updateReimburseProject(id, reimburseProject);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR)
|
||||
|
||||
+5
@@ -45,6 +45,11 @@ public class UnionReimburseDesc extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String fileDesc;
|
||||
|
||||
@Column
|
||||
@Comment("报销项目提示")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String projectTip;
|
||||
|
||||
@Column
|
||||
@Comment("排序字段")
|
||||
@Prev({
|
||||
|
||||
+5
@@ -69,6 +69,11 @@ public interface UnionReimburseService extends BaseService<UnionReimburse> {
|
||||
*/
|
||||
Result updateActuallyAmount(String id, Double realMoney);
|
||||
|
||||
/**
|
||||
* 修改非慰问报销记录的活动项目。
|
||||
*/
|
||||
Result updateReimburseProject(String id, String reimburseProject);
|
||||
|
||||
/**
|
||||
* 批量审核选中的待审核报销申请。
|
||||
*
|
||||
|
||||
+34
@@ -66,6 +66,13 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> implements UnionReimburseService {
|
||||
/** 非慰问报销项目允许在三个活动项目之间切换。 */
|
||||
private static final Set<String> ACTIVITY_REIMBURSE_PROJECTS = Set.of(
|
||||
"UNION_REIMBURSE_PROJECT_2",
|
||||
"UNION_REIMBURSE_PROJECT_3",
|
||||
"UNION_REIMBURSE_PROJECT_4"
|
||||
);
|
||||
|
||||
@Inject
|
||||
private SysFileService sysFileService;
|
||||
@Inject
|
||||
@@ -424,6 +431,11 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
|
||||
if (dbRecord == null) {
|
||||
return Result.error("未找到对应的报销记录");
|
||||
}
|
||||
// 实际报销金额不得超过申请金额,避免绕过前端校验直接修改数据。
|
||||
BigDecimal declaredMoney = getDeclaredApplyMoney(dbRecord);
|
||||
if (newMoney.compareTo(declaredMoney) > 0) {
|
||||
return Result.error("实际报销金额不能超过申请金额:" + declaredMoney.toPlainString());
|
||||
}
|
||||
if (Integer.valueOf(3).equals(dbRecord.getStateId()) && !skipBudgetDeduct(dbRecord)) {
|
||||
OutlayUseDetail oldDetail = dao().fetch(OutlayUseDetail.class, Cnd.where("outlayReimburseId", "=", dbRecord.getId()));
|
||||
BigDecimal oldMoney = oldDetail != null && oldDetail.getAdjustMoney() != null
|
||||
@@ -439,6 +451,28 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result updateReimburseProject(String id, String reimburseProject) {
|
||||
if (!isAdmin()) {
|
||||
return Result.error("无权修改报销项目");
|
||||
}
|
||||
if (StrUtil.hasBlank(id, reimburseProject)) {
|
||||
return Result.error("报销记录ID和报销项目不能为空");
|
||||
}
|
||||
UnionReimburse dbRecord = this.fetch(id);
|
||||
if (dbRecord == null) {
|
||||
return Result.error("未找到对应的报销记录");
|
||||
}
|
||||
// 慰问记录与活动项目字段不同,只允许活动项目之间切换。
|
||||
if (!ACTIVITY_REIMBURSE_PROJECTS.contains(dbRecord.getReimburseProject())
|
||||
|| !ACTIVITY_REIMBURSE_PROJECTS.contains(reimburseProject)) {
|
||||
return Result.error("慰问记录不可修改,报销项目只能在三个活动项目之间切换");
|
||||
}
|
||||
dbRecord.setReimburseProject(reimburseProject);
|
||||
this.updateIgnoreNull(dbRecord);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
private void normalizeInvoiceDetails(UnionReimburse unionReimburse) {
|
||||
if (unionReimburse.getInvoiceDetails() == null) {
|
||||
unionReimburse.setInvoiceDetails(new ArrayList<>());
|
||||
|
||||
@@ -46,6 +46,9 @@ public class WelfareFilterUserPageForm extends PageForm {
|
||||
@ApiModelProperty("人员类型")
|
||||
private String[] personTypes;
|
||||
|
||||
@ApiModelProperty("人员属性")
|
||||
private String[] userAttributes;
|
||||
|
||||
@ApiModelProperty("聘用方式")
|
||||
private String[] preparedBys;
|
||||
|
||||
|
||||
@@ -444,11 +444,13 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
||||
u.userState,
|
||||
u.unitId,
|
||||
u.unitName,
|
||||
threeUnit.name AS threeUnitName,
|
||||
u.unionId,
|
||||
u.unionName,
|
||||
u.member
|
||||
FROM
|
||||
vw_user u
|
||||
LEFT JOIN sys_unit threeUnit ON threeUnit.id = u.threeUnitId
|
||||
LEFT JOIN welfare_list w ON u.id = w.userId AND w.projectId = @projectId
|
||||
$condition
|
||||
""");
|
||||
@@ -471,6 +473,7 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
||||
cnd.andEX("u.unionId", "=", pageForm.getUnionId());
|
||||
cnd.andEX("u.unitId", "in", pageForm.getUnitIds());
|
||||
cnd.andEX("u.personType", "in", pageForm.getPersonTypes());
|
||||
cnd.andEX("u.userAttribute", "in", pageForm.getUserAttributes());
|
||||
cnd.andEX("u.preparedBy", "in", pageForm.getPreparedBys());
|
||||
cnd.andEX("u.userState", "in", pageForm.getUserStates());
|
||||
cnd.andEX("u.member","=",pageForm.getIsMember());
|
||||
@@ -523,6 +526,7 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
||||
cnd.andEX("unionId", "=", pageForm.getUnionId());
|
||||
cnd.andEX("unitId", "in", pageForm.getUnitIds());
|
||||
cnd.andEX("personType", "in", pageForm.getPersonTypes());
|
||||
cnd.andEX("userAttribute", "in", pageForm.getUserAttributes());
|
||||
cnd.andEX("preparedBy", "in", pageForm.getPreparedBys());
|
||||
cnd.andEX("userState", "in", pageForm.getUserStates());
|
||||
cnd.andEX("member","=",pageForm.getIsMember());
|
||||
|
||||
Reference in New Issue
Block a user