Commit 3802b547 by 江和松

物料清单页面文字修改、以及4级物料展示编号+名称

parent 1f33ff6d
......@@ -9,6 +9,8 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -82,7 +84,7 @@ public class ServiceHGKC003 extends ServiceBase {
HGKC003 hgkc003 = new HGKC003();
hgkc003.fromMap(resultRows.get(i));
// 数据校验
this.checkSubmitData(hgkc003);
this.checkUpdateData(hgkc003);
DaoUtils.update(HGKC003.UPDATE, hgkc003);
}
inInfo = this.query(inInfo);
......@@ -94,6 +96,12 @@ public class ServiceHGKC003 extends ServiceBase {
return inInfo;
}
private void checkUpdateData(HGKC003 hgkc003) {
AssertUtils.isEmpty(hgkc003.getWhCode(),"仓库编码不能为空!");
AssertUtils.isEmpty(hgkc003.getWhName(),"仓库名称不能为空!");
AssertUtils.isNull(hgkc003.getPrice(),"单价不能为空!");
}
/**
* 删除操作
*
......@@ -149,11 +157,11 @@ public class ServiceHGKC003 extends ServiceBase {
this.checkSubmitData(hgkc003);
DaoUtils.update(HGKC003.UPDATE_SUBMIT_STATUS, hgkc003);
//修改计划生产任务完工数量
HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId());
// 修改库存
HGKCUtils.HgKc010.updateInv(hgkc003.getCompanyCode(), hgkc003.getWhCode(), hgkc003.getPartSpecId(),
hgkc003.getInvQty(), hgkc003.getInvWeight());
//修改计划生产任务完工数量
HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "提交")});
......@@ -172,6 +180,21 @@ public class ServiceHGKC003 extends ServiceBase {
AssertUtils.isEmpty(hgkc003.getWhCode(),"仓库编码不能为空!");
AssertUtils.isEmpty(hgkc003.getWhName(),"仓库名称不能为空!");
AssertUtils.isNull(hgkc003.getPrice(),"单价不能为空!");
//判断是不是最前工序,如果不是得提示
List<HGPZ005A> hgpz005AList = HGPZTools.HgPz005A.queryByInventCode(hgkc003.getPartCode());
List<HGKC003> hgkc003List = HGKCTools.HgKc003.getByQualityId(hgkc003.getQualityId());
//当前提交的工序信息
HGPZ005A hgpz005AFilter = hgpz005AList.stream().filter(o->o.getInventCode().equals(hgkc003.getPartCode())).findAny().orElse(null);
AssertUtils.isNull(hgpz005AFilter,"此物料没有配置工序!");
for(HGKC003 entity : hgkc003List){
if(entity.getId().intValue() != hgkc003.getId().intValue()){
//遍历相同质检单的工序
HGPZ005A hgpz005A = hgpz005AList.stream().filter(o->o.getInventCode().equals(entity.getPartCode())).findAny().orElse(null);
//如果未提交的生产单有比当前更靠前的工序,则需要提示
AssertUtils.isTrue(hgpz005A.getProcessOrder().compareTo(hgpz005AFilter.getProcessOrder()) < 0,hgpz005A.getInventCode()+"的工序“"+hgpz005A.getProcessName()+"“未提交,生产入库号为:"+entity.getDepositNo());
}
}
}
/**
......@@ -220,11 +243,11 @@ public class ServiceHGKC003 extends ServiceBase {
newKc003.setStorageType(HGConstant.StorageType.TH);
newKc003.setIsReturn(CommonConstant.YesNo.YES_1);
DaoUtils.insert(HGKC003.INSERT, newKc003);
//修改计划生产任务完工数量
HGSCTools.complete(fKc003.getQualityId(),newKc003.getInvQty().intValue(),fKc003.getRectificationId());
// 修改库存
HGKCUtils.HgKc010.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getPartSpecId(),
newKc003.getInvQty(), newKc003.getInvWeight());
//修改计划生产任务完工数量
HGSCTools.complete(fKc003.getQualityId(),newKc003.getInvQty().intValue(),fKc003.getRectificationId());
}
}
......@@ -156,6 +156,23 @@ public class HGKCTools {
return list.get(0);
}
/**
* 生产入库单信息
*
* @param qualityId
* @return
*/
public static List<HGKC003> getByQualityId(Long qualityId) {
AssertUtils.isEmpty(Collections.singleton(qualityId), "质检单ID为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put("qualityId", qualityId);
paramMap.put("deleteFlag", 0);
paramMap.put("submitStatus", HGConstant.ProductStatus.YTJ);
List<HGKC003> list = DaoBase.getInstance().query(HGKC003.QUERY, paramMap);
AssertUtils.isEmpty(list, "生产入库单为空!");
return CollectionUtils.isEmpty(list) ? null : list;
}
public static HGKC003 save(HGKC003 hgkc003,List<HGKC003A> hgkc003aList){
checkSaveData(hgkc003,hgkc003aList);
......
......@@ -371,7 +371,7 @@
a.PROJ_NAME as "projName",<!-- 项目名称 -->
a.PRODUCT_NAME as "productName", <!-- 产品名称 -->
a.PRODUCT_CODE as "label", <!-- 名部件编码-->
case when a.lv = 3 then concat(a.PRODUCT_CODE,' ',a.PRODUCT_NAME) else a.PRODUCT_NAME end as "text", <!-- 部件名称 -->
case when a.lv in (3,4) then concat(a.PRODUCT_CODE,' ',a.PRODUCT_NAME) else a.PRODUCT_NAME end as "text", <!-- 部件名称 -->
a.PARENT_PROD_CODE as "pId", <!-- 父节点编码 -->
a.PARENT_PROD_NAME as "pName", <!-- 父节点名称 -->
a.LEAF as "leaf", <!-- 是否有叶子节点 -->
......
......@@ -231,7 +231,7 @@ let save = function (btnNode) {
function showDetail(id,companyCode,projCode) {
JSColorbox.open({
href: "HGSC004A?companyCode="+companyCode+"&projCode="+projCode+"&methodName=initLoad&inqu_status-0-materialId=" + id,
title: "<div style='text-align: center;'>蓝图清单详情</div>",
title: "<div style='text-align: center;'>物料清单详情</div>",
width: "80%",
height: "80%",
});
......
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