Commit a8956c16 by 江和松

bug清单处理

parent ad2a1979
...@@ -135,7 +135,7 @@ public class ServiceHGKC007A extends ServiceBase { ...@@ -135,7 +135,7 @@ public class ServiceHGKC007A extends ServiceBase {
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!"); AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!"); AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isNull(hgkc007a.getPrimaryId(), "未获取到其他出库单ID信息"); AssertUtils.isNull(hgkc007a.getPrimaryId(), "未获取到其他出库单ID信息");
HGKC010 hgkc010 = HGKCTools.HgKc010.get(hgkc007a.getCompanyCode(),hgkc007a.getWhCode(),hgkc007a.getPartCode()); HGKC010 hgkc010 = HGKCTools.HgKc010.get(hgkc007a.getCompanyCode(),hgkc007a.getWhCode(),hgkc007a.getInventCode());
if (hgkc010==null){ if (hgkc010==null){
throw new PlatException("实时库存不存在!"); throw new PlatException("实时库存不存在!");
} }
......
...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.security.UserSessionUtils; ...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC003; import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -27,13 +28,14 @@ public class ServiceHGSC003 extends ServiceBase { ...@@ -27,13 +28,14 @@ public class ServiceHGSC003 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGSC003.QUERY, new HGSC003()); inInfo = super.query(inInfo, HGSC003.QUERY, new HGSC003());
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
Map map = new HashMap(); Map map = new HashMap();
map.put(HGSC003.FIELD_account_code, UserSessionUtils.getAccountCode()); map.put(HGSC003.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID),map,false Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID),map,false
); );
} catch (PlatException e) { } catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo,e,"初始化失败");
} }
return inInfo; return inInfo;
} }
......
...@@ -3,13 +3,14 @@ package com.baosight.hggp.hg.sc.service; ...@@ -3,13 +3,14 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC009; import com.baosight.hggp.hg.sc.domain.HGSC009;
import com.baosight.hggp.hg.sb.tools.HGSBTools; import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -46,6 +47,11 @@ public class ServiceHGSC009 extends ServiceEPBase { ...@@ -46,6 +47,11 @@ public class ServiceHGSC009 extends ServiceEPBase {
List<String> orgIds = HGSBTools.getRoleCompanyCode(); List<String> orgIds = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,orgIds); qarma.put(Org.FIELD_ORG_ID,orgIds);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma); CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
try {
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
} catch (Exception e){
LogUtils.setDetailMsg(outInfo,e,"初始化失败");
}
return outInfo; return outInfo;
} }
......
...@@ -19,6 +19,7 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -19,6 +19,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.math.BigDecimal;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -213,6 +214,8 @@ public class ServiceHGZL001 extends ServiceBase { ...@@ -213,6 +214,8 @@ public class ServiceHGZL001 extends ServiceBase {
HGZL001 dbZl003 = dbZl001Map.get(checkNo); HGZL001 dbZl003 = dbZl001Map.get(checkNo);
AssertUtils.isNotEquals(CommonConstant.YesNo.NO_0, dbZl003.getStatus(), AssertUtils.isNotEquals(CommonConstant.YesNo.NO_0, dbZl003.getStatus(),
String.format("质检单[%s]状态不是\"未处理\",不允许操作", checkNo)); String.format("质检单[%s]状态不是\"未处理\",不允许操作", checkNo));
AssertUtils.isTrue(fZl001.getQualifyQty().compareTo(BigDecimal.ZERO) < 0 ,String.format("质检单[%s]的合格数量不能为负数", checkNo));
AssertUtils.isTrue(fZl001.getUnqualifyQty().compareTo(BigDecimal.ZERO) < 0 ,String.format("质检单[%s]的不合格数量不能为负数", checkNo));
AssertUtils.isNotEquals(fZl001.getQualifyQty().add(fZl001.getUnqualifyQty()), dbZl003.getReceiveQty(), AssertUtils.isNotEquals(fZl001.getQualifyQty().add(fZl001.getUnqualifyQty()), dbZl003.getReceiveQty(),
String.format("质检单[%s]的合格数量加不合格数量必须等于收货数量", checkNo)); String.format("质检单[%s]的合格数量加不合格数量必须等于收货数量", checkNo));
} }
......
$(function (){ $(function (){
var companyCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows(); var companyCodes = __eiInfo.getBlock("roleCompany").getMappedRows();
var projCodes = __eiInfo.getBlock("proj_record_block_id").getMappedRows(); var projCodes = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
...@@ -47,9 +47,9 @@ $(function (){ ...@@ -47,9 +47,9 @@ $(function (){
field: "companyCode", field: "companyCode",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < companyCodes.length; i++) { for (let i = 0; i < companyCodes.length; i++) {
if (companyCodes[i]['valueField'] === dataItem['companyCode']){ if (companyCodes[i]['companyCode'] === dataItem['companyCode']){
dataItem['companyName'] = companyCodes[i]['textField'] dataItem['companyName'] = companyCodes[i]['companyName']
return companyCodes[i]['textField']; return companyCodes[i]['companyName'];
} }
} }
return dataItem["companyCode"]; return dataItem["companyCode"];
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" width="120" required="true" maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/> <EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="false" width="120" align="center"/> <EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="false" width="120" align="center"/>
......
$(function () { $(function () {
var companyCodeBox = __eiInfo.getBlock("company_record_box_block_id").getMappedRows(); var companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var groupCodeBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows(); var groupCodeBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
...@@ -39,8 +39,8 @@ $(function () { ...@@ -39,8 +39,8 @@ $(function () {
title: "公司名称", title: "公司名称",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < companyCodeBox.length; i++) { for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCodeBox[i]['valueField'] === dataItem['companyCode']) { if (companyCodeBox[i]['companyCode'] === dataItem['companyCode']) {
return companyCodeBox[i]['textField']; return companyCodeBox[i]['companyCode'];
} }
} }
return dataItem["companyCode"]; return dataItem["companyCode"];
...@@ -103,8 +103,8 @@ $(function () { ...@@ -103,8 +103,8 @@ $(function () {
grid.dataSource.bind("change", function (e) { grid.dataSource.bind("change", function (e) {
if (e.field == "companyCode") { if (e.field == "companyCode") {
for (let i = 0; i < companyCodeBox.length; i++) { for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCodeBox[i]['valueField'] === e.items[0]['companyCode']) { if (companyCodeBox[i]['companyCode'] === e.items[0]['companyCode']) {
resultGrid.setCellValue(e.items[0],"companyName",companyCodeBox[i]['textField']); resultGrid.setCellValue(e.items[0],"companyName",companyCodeBox[i]['companyName']);
} }
} }
loadChange(grid, e, "projCode"); loadChange(grid, e, "projCode");
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" width="120" maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company_record_box_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" width="120" enable="false" readonly="true" align="center" hidden="true" /> <EF:EFColumn ename="companyName" cname="公司名称" width="120" enable="false" readonly="true" align="center" hidden="true" />
<%-- <EF:EFComboColumn ename="projCode" cname="项目编码"--%> <%-- <EF:EFComboColumn ename="projCode" cname="项目编码"--%>
......
...@@ -39,6 +39,24 @@ $(function () { ...@@ -39,6 +39,24 @@ $(function () {
return showUserName(options.createdBy, options.createdName); return showUserName(options.createdBy, options.createdName);
} }
}], }],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
var item = e.items[0];
//数量计算
if (e.field == "qualifyQty") {
if(item.qualifyQty && item.receiveQty){
let unqualifyQty = item.receiveQty - item.qualifyQty;
resultGrid.setCellValue(item, 'unqualifyQty', unqualifyQty)
}
}
if (e.field == "unqualifyQty") {
if(item.unqualifyQty && item.receiveQty){
let qualifyQty = item.receiveQty - item.unqualifyQty;
resultGrid.setCellValue(item, 'qualifyQty', qualifyQty)
}
}
});
},
onDelete: function (e) { onDelete: function (e) {
// 阻止默认请求,使用自定义删除 // 阻止默认请求,使用自定义删除
e.preventDefault(); e.preventDefault();
......
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