Commit bbbe110f by 江和松

附件工具类名字变更问题修改

parent e309556b
......@@ -390,4 +390,22 @@ public class HGConstant {
// 销售计划
public static final Integer S_1 = 1;
}
/**
* 物料清单
*
* @author:songx
* @date:2024/2/22,13:57
*/
public static class WlApprovalStatu {
// 待审核
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;
}
}
......@@ -2,11 +2,9 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.EDTools;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ProjectInfo;
......@@ -14,11 +12,9 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -54,7 +50,7 @@ public class ServiceHGSC003B extends ServiceEPBase {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
List<Map<String, Object>> EDCM01List = EDTools.EdCm01.list("hggp.sc.drawingBizType");
List<Map<String, Object>> EDCM01List = Iplat4jTools.EdCm01.list("hggp.sc.drawingBizType");
if(!CollectionUtils.isEmpty(EDCM01List)){
List<String> bizTypes = new ArrayList<>();
for(Map<String, Object> map : EDCM01List){
......
......@@ -520,6 +520,60 @@ public class ServiceHGSC004A extends ServiceBase {
return inInfo;
}
/**
* 修改审核状态
* @param inInfo
* @return
*/
public EiInfo batchApproval(EiInfo inInfo){
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
String materialId = eiBlock.getCellStr(ACConstants.ROW_CODE_0, HGSC004A.FIELD_material_id);
Map<String,Object> queryEntityMap = new HashMap<>();
queryEntityMap.put("materialId",materialId);
List<HGSC004A> allHgsc004AList = dao.query(HGSC004A.QUERY,queryEntityMap, 0, -999999);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGSC004A hgsc004a = new HGSC004A();
//前端传参不完全,但是肯定有id
hgsc004a.fromMap(map);
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);
DaoUtils.update(HGSC004A.UPDATE,hgsc004a);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param hgsc004a
*/
private void checkApproval(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()+"已审核,不能重复审核!");
}
private void saveTHGSC005(HGSC004 hgsc004,HGSC004A hgsc004a) {
//主表
......
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.EDTools;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ProjectInfo;
......@@ -16,11 +12,9 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Author wwl
......@@ -54,7 +48,7 @@ public class ServiceHGSC004B extends ServiceEPBase {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
List<Map<String, Object>> EDCM01List = EDTools.EdCm01.list("hggp.sc.bizType");
List<Map<String, Object>> EDCM01List = Iplat4jTools.EdCm01.list("hggp.sc.bizType");
if(!CollectionUtils.isEmpty(EDCM01List)){
List<String> bizTypes = new ArrayList<>();
for(Map<String, Object> map : EDCM01List){
......
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.EDTools;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ProjectInfo;
......@@ -13,11 +10,9 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -53,7 +48,7 @@ public class ServiceHGSC004D extends ServiceEPBase {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
List<Map<String, Object>> EDCM01List = EDTools.EdCm01.list("hggp.sc.bizType");
List<Map<String, Object>> EDCM01List = Iplat4jTools.EdCm01.list("hggp.sc.bizType");
if(!CollectionUtils.isEmpty(EDCM01List)){
List<String> bizTypes = new ArrayList<>();
for(Map<String, Object> map : EDCM01List){
......
......@@ -443,6 +443,7 @@ public class HGSCTools {
AssertUtils.isEmpty(hgsc004a.getProjName(), "请填写项目名称!");
AssertUtils.isTrue(hgsc004a.getSingleWeight().compareTo(BigDecimal.ZERO) <= 0, "单重不能小于等于0!");
}
}
public static class THGSC004B{
public static void save(HGSC004A oldHGSC004A,HGSC004A newHGSC004A) {
......
......@@ -13,6 +13,9 @@ $(function () {
// 批量提交
$("#BATCH_SUBMIT").on("click", batchSubmit);
// 批量审核
$("#BATCH_APPROVAL").on("click", batchApproval);
let inventNameGlobalData = [];
let parentId = '';
var strs;
......@@ -867,6 +870,39 @@ let batchSubmit = function () {
});
}
/**
* 审核操作
*
* @param id
* @param checkNo
*/
let batchApproval = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let singleWeight = rows[i]['singleWeight'];
let quantity = rows[i]['quantity'];
if (!isNumber(singleWeight) || !isNumber(quantity)) {
message("第" + (i + 1) + "行单重和数量必须是大于等于0的数字");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做审核操作吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC004A", "batchApproval", true, function (e) {
var status = e.getStatus();
if (status !== -1) {
query();
}
});
}
});
}
function loadChange(grid,e,field) {
var cell_label = field,that = grid;
......
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