Commit 3c9a496a by 江和松

物料清单增加审核功能

parent bbbe110f
......@@ -401,11 +401,7 @@ public class HGConstant {
// 待审核
public static final Integer S_0 = 0;
// 审核中
public static final Integer S_1 = 1;
// 审核通过
public static final Integer S_2 = 2;
// 审核拒绝
public static final Integer S_3 = 3;
// 已审核
public static final Integer S_1 = 2;
}
}
......@@ -447,6 +447,8 @@ public class ServiceHGSC004A extends ServiceBase {
Long id = hgsc004a.getId();
hgsc004a = allHgsc004AList.stream().filter(o -> o.getId().intValue() == id).findAny().orElse(null);
submitEntityList.add(hgsc004a);
//提交校验
checkSubmit(hgsc004a);
}
if(!CollectionUtils.isEmpty(submitEntityList)){
if(Objects.nonNull(hgsc004)){
......@@ -542,7 +544,7 @@ public class ServiceHGSC004A extends ServiceBase {
Long id = hgsc004a.getId();
hgsc004a = allHgsc004AList.stream().filter(o -> o.getId().intValue() == id.intValue()).findAny().orElse(null);
checkApproval(hgsc004a);
hgsc004a.setApprovalStatus(HGConstant.WlApprovalStatu.S_2);
hgsc004a.setApprovalStatus(HGConstant.WlApprovalStatu.S_1);
DaoUtils.update(HGSC004A.UPDATE,hgsc004a);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......@@ -562,6 +564,22 @@ public class ServiceHGSC004A extends ServiceBase {
*
* @param hgsc004a
*/
private void checkSubmit(HGSC004A hgsc004a) {
//为构件的需要验证是否已经存在了,不能重复添加
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(hgsc004a.getCompanyCode(), "请选择公司!");
AssertUtils.isEmpty(hgsc004a.getProjCode(), "请填写项目编号!");
AssertUtils.isEmpty(hgsc004a.getProjName(), "请填写项目名称!");
AssertUtils.isTrue(hgsc004a.getSingleWeight().compareTo(BigDecimal.ZERO) <= 0, "单重不能小于等于0!");
AssertUtils.isTrue(hgsc004a.getProductStatus().intValue() == HGConstant.ProductStatus.YTJ, hgsc004a.getProductCode()+"已提交,不能重复!");
AssertUtils.isTrue(hgsc004a.getApprovalStatus().intValue() == HGConstant.WlApprovalStatu.S_0, hgsc004a.getProductCode()+"未审批通过,不能提交!");
}
/**
* 校验保存的数据
*
* @param hgsc004a
*/
private void checkApproval(HGSC004A hgsc004a) {
//为构件的需要验证是否已经存在了,不能重复添加
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
......@@ -571,7 +589,7 @@ public class ServiceHGSC004A extends ServiceBase {
AssertUtils.isEmpty(hgsc004a.getProjName(), "请填写项目名称!");
AssertUtils.isTrue(hgsc004a.getSingleWeight().compareTo(BigDecimal.ZERO) <= 0, "单重不能小于等于0!");
AssertUtils.isTrue(hgsc004a.getProductStatus().intValue() == HGConstant.ProductStatus.YTJ, hgsc004a.getProductCode()+"已提交,不能审核!");
AssertUtils.isTrue(hgsc004a.getApprovalStatus().intValue() != HGConstant.WlApprovalStatu.S_0, hgsc004a.getProductCode()+"已审核,不能重复审核!");
AssertUtils.isTrue(hgsc004a.getApprovalStatus().intValue() == HGConstant.WlApprovalStatu.S_1, hgsc004a.getProductCode()+"已审核,不能重复审核!");
}
......
......@@ -69,7 +69,9 @@
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFComboColumn cname="审核状态" ename="approvalStatus" width="90" align="center" required="false" enable="false">
<EF:EFCodeOption codeName="hggp.hgyx.status" />
</EF:EFComboColumn>
<EF:EFComboColumn cname="提交状态" ename="productStatus" width="90" align="center" required="false" enable="false">
<EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFComboColumn>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment