Commit fbdbaec1 by 江和松

Merge remote-tracking branch 'origin/dev' into dev

parents 5ef7c17a 1c027b68
...@@ -91,9 +91,9 @@ public class ServiceHGKC006 extends ServiceBase { ...@@ -91,9 +91,9 @@ public class ServiceHGKC006 extends ServiceBase {
// 数据校验 // 数据校验
this.checkSaveData(resultRows); this.checkSaveData(resultRows);
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGKC006 hgkc006 = new HGKC006(); HGKC006 hgkc006 = new HGKC006();
hgkc006.fromMap(resultRows.get(i)); hgkc006.fromMap(resultRow);
hgkc006.setOtherEnterDate(DateUtils.formatShort(hgkc006.getOtherEnterDate())); hgkc006.setOtherEnterDate(DateUtils.formatShort(hgkc006.getOtherEnterDate()));
if (hgkc006.getId() == null || hgkc006.getId() == 0) { if (hgkc006.getId() == null || hgkc006.getId() == 0) {
this.add(hgkc006); this.add(hgkc006);
...@@ -176,7 +176,7 @@ public class ServiceHGKC006 extends ServiceBase { ...@@ -176,7 +176,7 @@ public class ServiceHGKC006 extends ServiceBase {
for(HGKC006A hgkc006A : hgkc006AList){ for(HGKC006A hgkc006A : hgkc006AList){
//增加库存 //增加库存
HGKCUtils.HgKc010.updateInv(hgkc006A.getCompanyCode(),hgkc006A.getWhCode(), HGKCUtils.HgKc010.updateInv(hgkc006A.getCompanyCode(),hgkc006A.getWhCode(),
hgkc006A.getPartCode(),hgkc006A.getInvQty(), hgkc006A.getInventCode(),hgkc006A.getInvQty(),
hgkc006A.getInvUnitWeight(),hgkc006A.getInvWeight()); hgkc006A.getInvUnitWeight(),hgkc006A.getInvWeight());
} }
} }
...@@ -200,12 +200,16 @@ public class ServiceHGKC006 extends ServiceBase { ...@@ -200,12 +200,16 @@ public class ServiceHGKC006 extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他入库单", operType = "删除", operDesc = "删除操作") @OperationLogAnnotation(operModul = "其他入库单", operType = "删除", operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGKC006 hgkc006 = new HGKC006(); HGKC006 hgkc006 = new HGKC006();
hgkc006.fromMap(resultRows.get(i)); hgkc006.fromMap(resultRow);
if (hgkc006.getSubmitStatus() == 1) {
throw new PlatException("入库单已提交,无法删除!");
}
// 校验企业下是否存在用户 // 校验企业下是否存在用户
int count = HGXSTools.XsUser.countByAccount(hgkc006.getAccountCode()); int count = HGXSTools.XsUser.countByAccount(hgkc006.getAccountCode());
if (count > 0) { if (count > 0) {
...@@ -217,7 +221,7 @@ public class ServiceHGKC006 extends ServiceBase { ...@@ -217,7 +221,7 @@ public class ServiceHGKC006 extends ServiceBase {
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败"); LogUtils.setDetailMsg(inInfo, e, "删除失败");
} }
return inInfo; return inInfo;
} }
......
...@@ -90,6 +90,9 @@ public class ServiceHGKC006A extends ServiceBase { ...@@ -90,6 +90,9 @@ public class ServiceHGKC006A extends ServiceBase {
hgkc006a.fromMap(resultMap); hgkc006a.fromMap(resultMap);
//查询主单 //查询主单
HGKC006 hgkc006 = HGKCTools.HgKc006.getById(hgkc006a.getPrimaryId()); HGKC006 hgkc006 = HGKCTools.HgKc006.getById(hgkc006a.getPrimaryId());
if(hgkc006.getSubmitStatus() == 1){
throw new PlatException("入库单已提交,添加保存失败!");
}
this.checkSaveData(hgkc006a,hgkc006); this.checkSaveData(hgkc006a,hgkc006);
this.setData(hgkc006a,hgkc006); this.setData(hgkc006a,hgkc006);
if(Objects.nonNull(hgkc006a.getId())&&hgkc006a.getId()!=0){ if(Objects.nonNull(hgkc006a.getId())&&hgkc006a.getId()!=0){
...@@ -135,19 +138,24 @@ public class ServiceHGKC006A extends ServiceBase { ...@@ -135,19 +138,24 @@ public class ServiceHGKC006A extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他入库单明细", operType = "删除", operDesc = "删除操作") @OperationLogAnnotation(operModul = "其他入库单明细", operType = "删除", operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
String submitStatus = inInfo.getCellStr(EiConstant.resultBlock, ACConstants.ROW_CODE_0, HGKC006.FIELD_SUBMIT_STATUS);
if(Objects.nonNull(submitStatus)&&submitStatus.equals("1")){
throw new PlatException("入库单已提交,删除失败!");
}
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGKC006A hgkc006A = new HGKC006A(); HGKC006A hgkc006A = new HGKC006A();
hgkc006A.fromMap(resultRows.get(i)); hgkc006A.fromMap(resultRow);
DaoUtils.update(HGKC006A.DELETE, hgkc006A); DaoUtils.update(HGKC006A.DELETE, hgkc006A);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败"); LogUtils.setDetailMsg(inInfo, e, "删除失败");
} }
return inInfo; return inInfo;
} }
......
...@@ -95,9 +95,9 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -95,9 +95,9 @@ public class ServiceHGKC007 extends ServiceBase {
// 数据校验 // 数据校验
this.checkSaveData(resultRows); this.checkSaveData(resultRows);
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGKC007 hgkc007 = new HGKC007(); HGKC007 hgkc007 = new HGKC007();
hgkc007.fromMap(resultRows.get(i)); hgkc007.fromMap(resultRow);
hgkc007.setOtherOutDate(DateUtils.formatShort(hgkc007.getOtherOutDate())); hgkc007.setOtherOutDate(DateUtils.formatShort(hgkc007.getOtherOutDate()));
if (hgkc007.getId() == null || hgkc007.getId() == 0) { if (hgkc007.getId() == null || hgkc007.getId() == 0) {
hgkc007.setSubmitStatus(HGConstant.ProductStatus.WTJ); hgkc007.setSubmitStatus(HGConstant.ProductStatus.WTJ);
...@@ -122,9 +122,9 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -122,9 +122,9 @@ public class ServiceHGKC007 extends ServiceBase {
*/ */
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
// 数据校验 // 数据校验
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGKC007 hgkc007 = new HGKC007(); HGKC007 hgkc007 = new HGKC007();
hgkc007.fromMap(resultRows.get(i)); hgkc007.fromMap(resultRow);
AssertUtils.isNull(hgkc007.getSubmitStatus(), "是否启用不能为空"); AssertUtils.isNull(hgkc007.getSubmitStatus(), "是否启用不能为空");
} }
} }
...@@ -176,8 +176,7 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -176,8 +176,7 @@ public class ServiceHGKC007 extends ServiceBase {
BigDecimal invWeight = hgkc007A.getInvWeight().multiply(new BigDecimal(-1)); BigDecimal invWeight = hgkc007A.getInvWeight().multiply(new BigDecimal(-1));
//减少库存 //减少库存
HGKCUtils.HgKc010.updateInv(hgkc007A.getCompanyCode(),hgkc007A.getWhCode(), HGKCUtils.HgKc010.updateInv(hgkc007A.getCompanyCode(),hgkc007A.getWhCode(),
hgkc007A.getPartCode(),qty, hgkc007A.getInventCode(),qty, invUnitWeight,invWeight);
invUnitWeight,invWeight);
} }
} }
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
...@@ -185,9 +184,8 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -185,9 +184,8 @@ public class ServiceHGKC007 extends ServiceBase {
} catch (PlatException e) { } catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE); eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("提交失败,原因参见详细错误描述!"); eiInfo.setMsg("提交失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("提交失败!", e.getMessage()); logError("提交失败!", e.getMessage());
return eiInfo; LogUtils.setDetailMsg(eiInfo, e, "提交失败");
} }
return eiInfo; return eiInfo;
} }
...@@ -206,9 +204,9 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -206,9 +204,9 @@ public class ServiceHGKC007 extends ServiceBase {
// 数据校验 // 数据校验
this.checkSaveData(resultRows); this.checkSaveData(resultRows);
// 数据写入 // 数据写入
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGKC007 hgkc007 = new HGKC007(); HGKC007 hgkc007 = new HGKC007();
hgkc007.fromMap(resultRows.get(i)); hgkc007.fromMap(resultRow);
this.add(hgkc007); this.add(hgkc007);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -228,14 +226,15 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -228,14 +226,15 @@ public class ServiceHGKC007 extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他出库单", operType = "修改", operDesc = "修改操作") @OperationLogAnnotation(operModul = "其他出库单", operType = "修改", operDesc = "修改操作")
@Override
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验 // 数据校验
this.checkSaveData(resultRows); this.checkSaveData(resultRows);
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGKC007 hppz009 = new HGKC007(); HGKC007 hppz009 = new HGKC007();
hppz009.fromMap(resultRows.get(i)); hppz009.fromMap(resultRow);
DaoUtils.update(HGKC007.UPDATE, hppz009); DaoUtils.update(HGKC007.UPDATE, hppz009);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -254,12 +253,16 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -254,12 +253,16 @@ public class ServiceHGKC007 extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他出库单", operType = "删除", operDesc = "删除操作") @OperationLogAnnotation(operModul = "其他出库单", operType = "删除", operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGKC007 hgkc007 = new HGKC007(); HGKC007 hgkc007 = new HGKC007();
hgkc007.fromMap(resultRows.get(i)); hgkc007.fromMap(resultRow);
if (hgkc007.getSubmitStatus() == 1) {
throw new PlatException("出库单已提交,删除失败!");
}
// 校验企业下是否存在用户 // 校验企业下是否存在用户
int count = HGXSTools.XsUser.countByAccount(hgkc007.getAccountCode()); int count = HGXSTools.XsUser.countByAccount(hgkc007.getAccountCode());
if (count > 0) { if (count > 0) {
...@@ -271,7 +274,7 @@ public class ServiceHGKC007 extends ServiceBase { ...@@ -271,7 +274,7 @@ public class ServiceHGKC007 extends ServiceBase {
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败"); LogUtils.setDetailMsg(inInfo, e, "删除失败");
} }
return inInfo; return inInfo;
} }
......
...@@ -44,7 +44,7 @@ public class ServiceHGPZ005B extends ServiceEPBase { ...@@ -44,7 +44,7 @@ public class ServiceHGPZ005B extends ServiceEPBase {
String userId = "admin".equals(UserSessionUtils.getUserId())?"":UserSessionUtils.getUserId(); String userId = "admin".equals(UserSessionUtils.getUserId())?"":UserSessionUtils.getUserId();
inInfo = super.query(inInfo, HGSJ002.QUERY, new HGSJ002()); inInfo = super.query(inInfo, HGSJ002.QUERY, new HGSJ002());
Map qarma = new HashMap(); Map qarma = new HashMap();
qarma.put(User.FIELD_USER_ID,userId); //qarma.put(User.FIELD_USER_ID,userId);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),qarma); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),qarma);
return inInfo; return inInfo;
} }
......
...@@ -171,7 +171,7 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -171,7 +171,7 @@ public class ServiceHGSC001 extends ServiceBase {
*/ */
public EiInfo depByCompanyComboBox(EiInfo inInfo){ public EiInfo depByCompanyComboBox(EiInfo inInfo){
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
String companyCode = MapUtils.getString(queryMap, HGSC001.FIELD_company_code); String companyCode = MapUtils.getString(queryMap, HGSC001.FIELD_company_code);
EiInfoUtils.addBlock(inInfo,"depByCompany", UserSessionUtils.getDepByCompany(companyCode), Dept.class); EiInfoUtils.addBlock(inInfo,"depByCompany", UserSessionUtils.getDepByCompany(companyCode), Dept.class);
CommonMethod.comboBoxDefaultValue(inInfo,"depByCompany","depCode","depName"); CommonMethod.comboBoxDefaultValue(inInfo,"depByCompany","depCode","depName");
......
...@@ -134,8 +134,12 @@ function check(id, auditStatus) { ...@@ -134,8 +134,12 @@ function check(id, auditStatus) {
inEiInfo.set("result-0-submitStatus", auditStatus); inEiInfo.set("result-0-submitStatus", auditStatus);
EiCommunicator.send('HGKC007', 'check', inEiInfo, { EiCommunicator.send('HGKC007', 'check', inEiInfo, {
onSuccess(response) { onSuccess(response) {
message("提交成功"); if (response.getStatus() === -1) {
resultGrid.dataSource.page(1); NotificationUtil({msg: response.msg, detailMsg: response.detailMsg}, "error");
} else {
NotificationUtil(response.msg);
query();
}
}, },
onFail(errorMessage, status, e) { onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error"); NotificationUtil("执行失败!", "error");
......
...@@ -12,37 +12,38 @@ $(function () { ...@@ -12,37 +12,38 @@ $(function () {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200], pageSizes: [10, 20, 30, 50, 100, 200],
}, },
columns: [{ columns: [
field: "inventCode", {
template: function (item) { field: "inventCode",
let template = ""; template: function (item) {
if(item.inventCode){ let template = "";
for(let i=0;i<inventRecordBoxBlocks.length;i++){ if(item.inventCode){
if(item.inventCode === inventRecordBoxBlocks[i]['valueField']){ for(let i=0;i<inventRecordBoxBlocks.length;i++){
item.inventName = inventRecordBoxBlocks[i]['textField']; if(item.inventCode === inventRecordBoxBlocks[i]['valueField']){
template = inventRecordBoxBlocks[i]['valueField']; item.inventName = inventRecordBoxBlocks[i]['textField'];
template = inventRecordBoxBlocks[i]['valueField'];
}
} }
} }
return template;
},
editor: function (container, options) {
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: inventRecordBoxBlocks,
minLength: 0,
dataTextField: "textField",
dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#[#:param3Field#]",
valueTemplate: "[#:valueField#]#:textField#[#:param3Field#]",
template: "[#:valueField#]#:textField#[#:param3Field#]",
filter: "contains"
});
} }
return template;
}, },
editor: function (container, options) {
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: inventRecordBoxBlocks,
minLength: 0,
dataTextField: "textField",
dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#[#:param3Field#]",
valueTemplate: "[#:valueField#]#:textField#[#:param3Field#]",
template: "[#:valueField#]#:textField#[#:param3Field#]",
filter: "contains"
});
}
},
{ {
field: "partSpec", field: "partSpec",
template: function (item) { template: function (item) {
...@@ -215,7 +216,7 @@ $(function () { ...@@ -215,7 +216,7 @@ $(function () {
*/ */
$(window).load(function () { $(window).load(function () {
query(); query();
let submitStatus = $("#inqu_status_0_submitStatus").val(); let submitStatus = $("#inqu_status-0-submitStatus").val();
let source = $("#inqu_status-0-source").val(); let source = $("#inqu_status-0-source").val();
//只有手动录入的才能修改 //只有手动录入的才能修改
if(submitStatus==1 || source != "1"){ if(submitStatus==1 || source != "1"){
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn cname="类型编码" ename="inventType" enable="true" width="120" readonly="true" align="center"/> <EF:EFColumn cname="类型编码" ename="inventType" enable="true" width="120" readonly="true" align="center" required="true"/>
<EF:EFColumn cname="存货类型" ename="inventTypeName" width="140" align="center" required="true"/> <EF:EFColumn cname="存货类型" ename="inventTypeName" width="140" align="center" required="true"/>
<EF:EFComboColumn ename="inventTypeDetail" cname="存货类型明细" width="80" align="center" readonly="false"> <EF:EFComboColumn ename="inventTypeDetail" cname="存货类型明细" width="80" align="center" readonly="false">
<EF:EFCodeOption codeName="hggp.hgpz.inventTypeDetail"/> <EF:EFCodeOption codeName="hggp.hgpz.inventTypeDetail"/>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/> <EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center"/>
<EF:EFColumn ename="companyCode" cname="公司名称" enable="true" width="120" align="center" required="true"/> <EF:EFColumn ename="companyCode" cname="公司名称" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" required="true"/> <EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="160" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readonly="true"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="personDepName" cname="所属部门" enable="true" width="120" align="center" required="true"/> <EF:EFColumn ename="personDepName" cname="所属部门" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="personName" cname="姓名" enable="true" width="120" align="center" required="true"/> <EF:EFColumn ename="personName" cname="姓名" enable="true" width="120" align="center" required="true"/>
......
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