Commit 4ef826e1 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents e85aadb3 487d7713
......@@ -115,6 +115,15 @@ public enum DdynamicEnum {
INVENT_ALL_BOX_BLOCK_ID("invent_all_box_block_id", "id", "spec", "material", "unit", "length", "width", "thick",
"coefficient","status", "HGPZ005.queryInventBoxAll"),
/**
* 模块:存货档案(ALL 不默认状态)
* 用途:存货档案下拉框
* 编写:
*/
INVENT_NAME_BOX_BLOCK_ID("invent_name_box_block_id", "inventCode", "inventText","inventName", "spec", "inventType", "length", "width", "thick",
"coefficient","id", "HGPZ005.queryInventNameBox"),
/**
* 模块:规格
* 用途:存货档案下拉框
......@@ -354,6 +363,8 @@ public enum DdynamicEnum {
private String param8;
private String param9;
private String param10;
/** 数据源 */
private final String dbSource;
......@@ -463,6 +474,22 @@ public enum DdynamicEnum {
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String param7,String param8,String dbSource) {
this.blockId = blockId;
this.value = value;
this.text = text;
this.param1 = param1;
this.param2 = param2;
this.param3 = param3;
this.param4 = param4;
this.param5 = param5;
this.param6 = param6;
this.param7 = param7;
this.param8 = param8;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String param7,String param8,String param9,String dbSource) {
this.blockId = blockId;
this.value = value;
......@@ -479,6 +506,7 @@ public enum DdynamicEnum {
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3,
String param4, String param5, String param6, String param7, String param8, String param9,
String dbSource, Map paramMap) {
......@@ -601,6 +629,13 @@ public enum DdynamicEnum {
this.param9 = param9;
}
public String getParam10() {
return param10;
}
public void setParam10(String param10) {
this.param10 = param10;
}
public Map getParamMap() {
return paramMap;
}
......
......@@ -64,6 +64,9 @@ public class HGConstants {
public static final String PARAM9_FIELD = "param9Field";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String PARAM10_FIELD = "param10Field";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String VALUE_FIELD = "valueField";
public static final String PARAM_FILENAME = "fileName";
......
......@@ -75,6 +75,8 @@ public class HGConstant {
public static final String HGSC008_WORK_CODE = "HGSC008_WORK_CODE";
//工序质检
public static final String HGZL002_CHECK_CODE = "HGZL002_CHECK_CODE";
//日常巡检
public static final String HGZL003_CHECK_CODE = "HGZL003_CHECK_CODE";
//生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO";
//售后维修单号
......@@ -265,6 +267,36 @@ public class HGConstant {
/**
*
* 出库单数据来源
* @author:songx
* @date:2024/5/15,15:18
*/
public static class CKSource {
// 手动录入
public static final Integer SDLR = 1;
// 盘亏
public static final Integer PK = 2;
// 调拨
public static final Integer DB = 3;
}
/**
*
* 入库单数据来源
* @author:songx
* @date:2024/5/15,15:18
*/
public static class RKSource {
// 手动录入
public static final Integer SDLR = 1;
// 盘盈
public static final Integer PY = 2;
// 调拨
public static final Integer DB = 3;
}
/**
*
* 物料变动状态
* @author:songx
* @date:2024/5/15,15:18
......
......@@ -92,7 +92,7 @@ public class HGCW010 extends DaoEPBase {
private String projName = " "; /* 项目名称*/
private String projCode = " "; /* 项目编号*/
private String settlementNumber = " "; /* 来源单号*/
private String billTybe = " "; /* 票据类型*/
private Integer billTybe; /* 票据类型*/
private String billNumber = " "; /* 发票号*/
private Integer billState; /* 开票状态*/
private String signingDate = " "; /* 开票日期*/
......@@ -100,7 +100,7 @@ public class HGCW010 extends DaoEPBase {
private Integer reviewStatus; /* 审批状态*/
private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/
private String taxPoints = " "; /* 税率*/
private Integer taxPoints ; /* 税率*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 开票总额*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
......@@ -349,7 +349,7 @@ public class HGCW010 extends DaoEPBase {
* get the billTybe - 票据类型.
* @return the billTybe
*/
public String getBillTybe() {
public Integer getBillTybe() {
return this.billTybe;
}
......@@ -358,7 +358,7 @@ public class HGCW010 extends DaoEPBase {
*
* @param billTybe - 票据类型
*/
public void setBillTybe(String billTybe) {
public void setBillTybe(Integer billTybe) {
this.billTybe = billTybe;
}
/**
......@@ -477,7 +477,7 @@ public class HGCW010 extends DaoEPBase {
* get the taxPoints - 税率.
* @return the taxPoints
*/
public String getTaxPoints() {
public Integer getTaxPoints() {
return this.taxPoints;
}
......@@ -486,7 +486,7 @@ public class HGCW010 extends DaoEPBase {
*
* @param taxPoints - 税率
*/
public void setTaxPoints(String taxPoints) {
public void setTaxPoints(Integer taxPoints) {
this.taxPoints = taxPoints;
}
/**
......@@ -640,7 +640,7 @@ public class HGCW010 extends DaoEPBase {
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setBillTybe(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_TYBE)), billTybe));
setBillTybe(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_TYBE)), billTybe));
setBillNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_NUMBER)), billNumber));
setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
......@@ -648,7 +648,7 @@ public class HGCW010 extends DaoEPBase {
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
setTaxPoints(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
......
......@@ -29,6 +29,7 @@ public class HGCW010A extends DaoEPBase {
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PARTY_A = "partyA"; /* 项目名称*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 合同号*/
public static final String FIELD_CONTRACT_NAME = "contractName"; /* 合同名称*/
public static final String FIELD_SETTLEMENT_NUMBER = "settlementNumber"; /* 结算编号*/
......@@ -85,8 +86,8 @@ public class HGCW010A extends DaoEPBase {
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String QUERY = "HGCW008.query";
public static final String COUNT = "HGCW008.count";
public static final String QUERY = "HGCW010A.query";
public static final String COUNT = "HGCW010A.count";
public static final String INSERT = "HGCW008.insert";
public static final String UPDATE = "HGCW008.update";
public static final String DELETE = "HGCW008.delete";
......@@ -97,6 +98,7 @@ public class HGCW010A extends DaoEPBase {
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String partyA = " "; /* 客户名称*/
private String contractNumber = " "; /* 合同号*/
private String contractName = " "; /* 合同名称*/
private String settlementNumber = " "; /* 结算编号*/
......@@ -160,6 +162,10 @@ public class HGCW010A extends DaoEPBase {
eiColumn.setDescName("合同名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SETTLEMENT_NUMBER);
eiColumn.setDescName("结算编号");
eiMetadata.addMeta(eiColumn);
......@@ -375,6 +381,22 @@ public class HGCW010A extends DaoEPBase {
this.projName = projName;
}
/**
* get the partyA - 客户名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 客户名称.
*
* @param partyA - 项目名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the contractNumber - 合同号.
* @return the contractNumber
*/
......@@ -748,6 +770,7 @@ public class HGCW010A extends DaoEPBase {
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setContractName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NAME)), contractName));
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
......@@ -786,6 +809,7 @@ public class HGCW010A extends DaoEPBase {
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_CONTRACT_NAME, StringUtils.toString(contractName, eiMetadata.getMeta(FIELD_CONTRACT_NAME)));
map.put(FIELD_SETTLEMENT_NUMBER, StringUtils.toString(settlementNumber, eiMetadata.getMeta(FIELD_SETTLEMENT_NUMBER)));
......
......@@ -17,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-28 18:02:47 create
* @history 2024-06-04 8:23:50 create
*/
public class HGCW011 extends DaoEPBase {
......@@ -86,7 +86,7 @@ public class HGCW011 extends DaoEPBase {
private String partyA = " "; /* 客户名称*/
private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/
private Boolean taxPoints; /* 税率*/
private Integer taxPoints = new Integer(0); /* 税率*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 开票总额*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
......@@ -396,7 +396,7 @@ public class HGCW011 extends DaoEPBase {
* get the taxPoints - 税率.
* @return the taxPoints
*/
public Boolean getTaxPoints() {
public Integer getTaxPoints() {
return this.taxPoints;
}
......@@ -405,7 +405,7 @@ public class HGCW011 extends DaoEPBase {
*
* @param taxPoints - 税率
*/
public void setTaxPoints(Boolean taxPoints) {
public void setTaxPoints(Integer taxPoints) {
this.taxPoints = taxPoints;
}
/**
......@@ -556,7 +556,7 @@ public class HGCW011 extends DaoEPBase {
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
setTaxPoints(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
......
......@@ -17,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-30 14:16:59 create
* @history 2024-06-05 9:05:21 create
*/
public class HGCW012 extends DaoEPBase {
......@@ -38,7 +38,7 @@ public class HGCW012 extends DaoEPBase {
public static final String FIELD_TAX_POINTS = "taxPoints"; /* 税率*/
public static final String FIELD_THIS_SETTLEMENT_TAX = "thisSettlementTax"; /* 税额*/
public static final String FIELD_THIS_SETTLEMENT_AMOUNT = "thisSettlementAmount"; /* 不含税金额*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 票总额*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 票总额*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
......@@ -47,6 +47,7 @@ public class HGCW012 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String FIELD_RECEIVE_DATE = "receiveDate"; /* 收票日期*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -62,7 +63,7 @@ public class HGCW012 extends DaoEPBase {
public static final String COL_TAX_POINTS = "TAX_POINTS"; /* 税率*/
public static final String COL_THIS_SETTLEMENT_TAX = "THIS_SETTLEMENT_TAX"; /* 税额*/
public static final String COL_THIS_SETTLEMENT_AMOUNT = "THIS_SETTLEMENT_AMOUNT"; /* 不含税金额*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 票总额*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 票总额*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
......@@ -71,6 +72,7 @@ public class HGCW012 extends DaoEPBase {
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_REMAINING_AMOUNT = "REMAINING_AMOUNT"; /* 剩余开票/收票金额*/
public static final String COL_RECEIVE_DATE = "RECEIVE_DATE"; /* 收票日期*/
public static final String QUERY = "HGCW012.query";
public static final String COUNT = "HGCW012.count";
......@@ -88,11 +90,11 @@ public class HGCW012 extends DaoEPBase {
private Integer billState = new Integer(0); /* 开票状态*/
private String signingDate = " "; /* 开票日期*/
private String partyA = " "; /* 供应商名称*/
private Integer reviewStatus; /* 审批状态*/
private Boolean reviewStatus; /* 审批状态*/
private Integer taxPoints = new Integer(0); /* 税率*/
private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 票总额*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 票总额*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
......@@ -101,6 +103,7 @@ public class HGCW012 extends DaoEPBase {
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余开票/收票金额*/
private String receiveDate = " "; /* 收票日期*/
/**
* initialize the metadata.
......@@ -169,7 +172,7 @@ public class HGCW012 extends DaoEPBase {
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("票总额");
eiColumn.setDescName("票总额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
......@@ -207,6 +210,10 @@ public class HGCW012 extends DaoEPBase {
eiColumn.setDescName("剩余开票/收票金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_DATE);
eiColumn.setDescName("收票日期");
eiMetadata.addMeta(eiColumn);
}
......@@ -381,7 +388,7 @@ public class HGCW012 extends DaoEPBase {
* get the reviewStatus - 审批状态.
* @return the reviewStatus
*/
public Integer getReviewStatus() {
public Boolean getReviewStatus() {
return this.reviewStatus;
}
......@@ -390,7 +397,7 @@ public class HGCW012 extends DaoEPBase {
*
* @param reviewStatus - 审批状态
*/
public void setReviewStatus(Integer reviewStatus) {
public void setReviewStatus(Boolean reviewStatus) {
this.reviewStatus = reviewStatus;
}
/**
......@@ -442,7 +449,7 @@ public class HGCW012 extends DaoEPBase {
this.thisSettlementAmount = thisSettlementAmount;
}
/**
* get the totalContractPriceIncluding - 票总额.
* get the totalContractPriceIncluding - 票总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
......@@ -450,9 +457,9 @@ public class HGCW012 extends DaoEPBase {
}
/**
* set the totalContractPriceIncluding - 票总额.
* set the totalContractPriceIncluding - 票总额.
*
* @param totalContractPriceIncluding - 票总额
* @param totalContractPriceIncluding - 票总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
......@@ -586,6 +593,22 @@ public class HGCW012 extends DaoEPBase {
this.remainingAmount = remainingAmount;
}
/**
* get the receiveDate - 收票日期.
* @return the receiveDate
*/
public String getReceiveDate() {
return this.receiveDate;
}
/**
* set the receiveDate - 收票日期.
*
* @param receiveDate - 收票日期
*/
public void setReceiveDate(String receiveDate) {
this.receiveDate = receiveDate;
}
/**
* get the value from Map.
*
* @param map - source data map
......@@ -603,7 +626,7 @@ public class HGCW012 extends DaoEPBase {
setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setReviewStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
......@@ -616,6 +639,7 @@ public class HGCW012 extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
setReceiveDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIVE_DATE)), receiveDate));
}
/**
......@@ -648,6 +672,7 @@ public class HGCW012 extends DaoEPBase {
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
map.put(FIELD_RECEIVE_DATE, StringUtils.toString(receiveDate, eiMetadata.getMeta(FIELD_RECEIVE_DATE)));
return map;
}
......
......@@ -71,6 +71,8 @@ public class ServiceHGCW001 extends ServiceBase {
HGCW001 HGCW001 = new HGCW001();
HGCW001.fromMap(resultRows.get(i));
HGCW001.setAccountPeriod(DateUtils.formatShort(HGCW001.getAccountPeriod()));
HGCW001.setAccountPeriodDateStart(DateUtils.formatShort(HGCW001.getAccountPeriodDateStart()));
HGCW001.setAccountPeriodDateEnd(DateUtils.formatShort(HGCW001.getAccountPeriodDateEnd()));
if (HGCW001.getId() == null || HGCW001.getId() == 0) {
this.add(HGCW001);
} else {
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW015;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
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.ServiceBase;
import java.util.Arrays;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW010B extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID,
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW015().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW010.QUERY, new HGCW010());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.cw.domain.HGCW015;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
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.ServiceBase;
import java.util.Arrays;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW010C extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID,
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW015().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW015.QUERY, new HGCW015());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.cw.domain.HGCW010A;
import com.baosight.hggp.util.LogUtils;
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.ServiceBase;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW012A extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW010A.QUERY, new HGCW010A());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -305,4 +305,25 @@
WHERE
ID = #id#
</update>
<update id="submit">
UPDATE ${hggpSchema}.HGCW010
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
<update id="billing">
UPDATE ${hggpSchema}.HGCW010
SET
BILL_STATE = #billState#, <!-- 开票状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -35,8 +35,30 @@
-->
<sqlMap namespace="HGCW010A">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
T1.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(T1.CREATED_BY = #authOnlyPeople# OR T1.DEP_CODE IN <iterate close=")" open="(" conjunction=","
property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
T1.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
T1.DEP_CODE IN
<iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id">
T1.ID = #id#
</isNotEmpty>
......@@ -55,6 +77,9 @@
<isNotEmpty prepend=" AND " property="projName">
T1.PROJ_NAME like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
B.PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
T1.CONTRACT_NUMBER like ('%$contractNumber$%')
</isNotEmpty>
......@@ -130,7 +155,7 @@
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW008">
resultClass="com.baosight.hggp.hg.cw.domain.HGCW010A">
SELECT
T1.ID as "id",
T1.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
......@@ -138,6 +163,7 @@
T1.COMPANY_NAME as "companyName", <!-- 公司名称 -->
T1.PROJ_CODE as "projCode", <!-- 项目编码 -->
T1.PROJ_NAME as "projName", <!-- 项目名称 -->
B.PARTY_A as "partyA",<!-- 客户名称 -->
T1.CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
T1.CONTRACT_NAME as "contractName", <!-- 合同名称 -->
T1.SETTLEMENT_NUMBER as "settlementNumber", <!-- 结算编号 -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-23 9:08:57
Generate time : 2024-06-04 8:23:50
Version : 1.0
schema : hggp
tableName : HGCW011
ID BIGINT NOT NULL primarykey,
MAIN_ID BIGINT NOT NULL,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
INCOME_NUMBER VARCHAR,
SIGNING_DATE VARCHAR,
PROJ_NAME VARCHAR,
PROJ_CODE VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
BILL_NUMBER VARCHAR,
PARTY_A VARCHAR,
CANCEL_STATUS TINYINT,
REVIEW_STATUS TINYINT,
TOTAL_CONTRACT_PRICE_INCLUDING VARCHAR,
THIS_SETTLEMENT_TAX VARCHAR,
THIS_SETTLEMENT_AMOUNT VARCHAR,
TAX_POINTS INTEGER,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
......@@ -29,6 +32,9 @@
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainId">
MAIN_ID = #mainId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -38,23 +44,29 @@
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
<isNotEmpty prepend=" AND " property="billNumber">
BILL_NUMBER = #billNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cancelStatus">
CANCEL_STATUS = #cancelStatus#
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
......@@ -86,16 +98,19 @@
resultClass="com.baosight.hggp.hg.cw.domain.HGCW011">
SELECT
ID as "id",
MAIN_ID as "mainId", <!-- 主表ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
INCOME_NUMBER as "incomeNumber", <!-- 单号 -->
SIGNING_DATE as "signingDate", <!-- 付款日期 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
CANCEL_STATUS as "cancelStatus", <!-- 核销状态 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 付款总额 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PROJ_CODE as "projCode", <!-- 项目编号 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
PARTY_A as "partyA", <!-- 客户名称 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 开票总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
......@@ -125,6 +140,9 @@
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainId">
MAIN_ID = #mainId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......@@ -134,23 +152,29 @@
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
<isNotEmpty prepend=" AND " property="billNumber">
BILL_NUMBER = #billNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cancelStatus">
CANCEL_STATUS = #cancelStatus#
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
......@@ -180,16 +204,19 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW011 (ID,
MAIN_ID, <!-- 主表ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
INCOME_NUMBER, <!-- 单号 -->
SIGNING_DATE, <!-- 付款日期 -->
PARTY_A, <!-- 供应商名称 -->
CANCEL_STATUS, <!-- 核销状态 -->
REVIEW_STATUS, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 付款总额 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_CODE, <!-- 项目编号 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_NUMBER, <!-- 发票号 -->
PARTY_A, <!-- 客户名称 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TAX_POINTS, <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 开票总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
......@@ -198,7 +225,7 @@
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #incomeNumber#, #signingDate#, #partyA#, #cancelStatus#, #reviewStatus#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#, #billNumber#, #partyA#, #thisSettlementTax#, #thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
</insert>
<delete id="delete">
......@@ -209,16 +236,19 @@
<update id="update">
UPDATE ${hggpSchema}.HGCW011
SET
MAIN_ID = #mainId#, <!-- 主表ID -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
INCOME_NUMBER = #incomeNumber#, <!-- 单号 -->
SIGNING_DATE = #signingDate#, <!-- 付款日期 -->
PARTY_A = #partyA#, <!-- 供应商名称 -->
CANCEL_STATUS = #cancelStatus#, <!-- 核销状态 -->
REVIEW_STATUS = #reviewStatus#, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 付款总额 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PROJ_CODE = #projCode#, <!-- 项目编号 -->
SETTLEMENT_NUMBER = #settlementNumber#, <!-- 来源单号 -->
BILL_NUMBER = #billNumber#, <!-- 发票号 -->
PARTY_A = #partyA#, <!-- 客户名称 -->
THIS_SETTLEMENT_TAX = #thisSettlementTax#, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#, <!-- 不含税金额 -->
TAX_POINTS = #taxPoints#, <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 开票总额 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-30 14:16:59
Generate time : 2024-06-05 9:05:21
Version : 1.0
schema : hggp
tableName : HGCW012
......@@ -26,7 +26,8 @@
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR,
REMAINING_AMOUNT DECIMAL
REMAINING_AMOUNT DECIMAL,
RECEIVE_DATE VARCHAR
-->
<sqlMap namespace="HGCW012">
......@@ -100,6 +101,9 @@
<isNotEmpty prepend=" AND " property="remainingAmount">
REMAINING_AMOUNT = #remainingAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveDate">
RECEIVE_DATE = #receiveDate#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -119,7 +123,7 @@
TAX_POINTS as "taxPoints", <!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 票总额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 票总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
......@@ -127,7 +131,8 @@
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount" <!-- 剩余开票/收票金额 -->
REMAINING_AMOUNT as "remainingAmount", <!-- 剩余开票/收票金额 -->
RECEIVE_DATE as "receiveDate" <!-- 收票日期 -->
FROM ${hggpSchema}.HGCW012 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -216,6 +221,9 @@
<isNotEmpty prepend=" AND " property="remainingAmount">
REMAINING_AMOUNT = #remainingAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveDate">
RECEIVE_DATE = #receiveDate#
</isNotEmpty>
-->
<insert id="insert">
......@@ -233,7 +241,7 @@
TAX_POINTS, <!-- 税率 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 票总额 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 票总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
......@@ -241,9 +249,10 @@
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
REMAINING_AMOUNT <!-- 剩余开票/收票金额 -->
REMAINING_AMOUNT, <!-- 剩余开票/收票金额 -->
RECEIVE_DATE <!-- 收票日期 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#)
</insert>
<delete id="delete">
......@@ -267,7 +276,7 @@
TAX_POINTS = #taxPoints#, <!-- 税率 -->
THIS_SETTLEMENT_TAX = #thisSettlementTax#, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#, <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 票总额 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 票总额 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
......@@ -275,18 +284,10 @@
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
REMAINING_AMOUNT = #remainingAmount# <!-- 剩余开票/收票金额 -->
REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余开票/收票金额 -->
RECEIVE_DATE = #receiveDate# <!-- 收票日期 -->
WHERE
ID = #id#
</update>
<update id="updateDeductionAmount">
UPDATE ${hggpSchema}.HGCW012
SET
REMAINING_AMOUNT = #remainingAmount#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -304,12 +304,31 @@ public class HGCWTools {
public static HGCW010 getId(String id) {
AssertUtils.isNull(id, "销售票据ID不能为空!");
AssertUtils.isNull(id, "销售开票单ID不能为空!");
List<HGCW010> results = DaoBase.getInstance().query(HGCW010.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static void updateAmount(Long id) {
AssertUtils.isNull(id, "收款单ID不能为空!");
HGCW010 hgcw010 = HGCWTools.HgCw010.getId(id.toString());
List<HGCW011> hgcw011s = HGCWTools.HgCw011.getMainId(hgcw010.getId());
if (CollectionUtils.isNotEmpty(hgcw011s)) {
// 更新主表
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011s) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding());
}
hgcw010.setTotalContractPriceIncluding(totalContractPriceIncluding);
hgcw010.setPartyA(hgcw011s.get(0).getPartyA());
hgcw010.setProjCode(hgcw011s.get(0).getProjCode());
hgcw010.setProjName(hgcw011s.get(0).getProjName());
DaoUtils.update("HGCW010.update", hgcw010);
}
}
public static void cutAmount(String settlementNumber, BigDecimal cutAmount) {
AssertUtils.isNull(settlementNumber, "来源单号不能为空!");
// if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
......@@ -334,23 +353,39 @@ public class HGCWTools {
}
public static class HgCw011 {
public static HGCW011 getId(Long id) {
AssertUtils.isNull(id, "销售开票单ID不能为空!");
List<HGCW011> results = DaoBase.getInstance().query(HGCW011.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static List<HGCW011> mapToList(List<Map> rows, Long mainId) {
List<HGCW011> hgcw011List = new ArrayList<>();
List<HGCW011> HGCW011List = new ArrayList<>();
if (CollectionUtils.isNotEmpty(rows)) {
rows.forEach(row -> {
HGCW011 hgcw011 = new HGCW011();
hgcw011.fromMap(row);
String contractNumber = row.get("settlementNumber").toString();
String remainingAmount = row.get("remainingAmount").toString();
hgcw011.setBillNumber(contractNumber);
hgcw011.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
HGCW011 HGCW011 = new HGCW011();
HGCW011.fromMap(row);
String settlementNumber = row.get("settlementNumber").toString();
String remainingAmount = row.get("thisAmount").toString();
HGCW011.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
HGCW011.setSettlementNumber(settlementNumber);
if (mainId != null) {
hgcw011.setMainId(mainId);
HGCW011.setMainId(mainId);
}
hgcw011List.add(hgcw011);
HGCW011List.add(HGCW011);
});
}
return hgcw011List;
return HGCW011List;
}
public static List<HGCW011> getMainId(Long mainId) {
AssertUtils.isNull(mainId, "主表ID不能为空!");
List<HGCW011> results = DaoBase.getInstance().query(HGCW011.QUERY,new HashMap<String,Object>(){
{put("mainId",mainId);}
});
return results;
}
}
......
......@@ -22,7 +22,7 @@ public class HGKC006A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
......@@ -66,12 +66,14 @@ public class HGKC006A extends DaoEPBase {
public static final String FIELD_PART_WIDTH = "partWidth"; /* 零件-宽*/
public static final String FIELD_PART_THICK = "partThick"; /* 零件-厚*/
public static final String FIELD_PART_SPEC = "partSpec"; /* 零件规格*/
public static final String FIELD_PART_SPEC_ID = "partSpecId"; /* 零件规格ID*/
public static final String FIELD_PRIMARY_ID = "primaryId"; /* 主表id*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_SOURCE = "source"; /* 数据来源*/
public static final String COL_ID = "ID";
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
......@@ -115,6 +117,7 @@ public class HGKC006A extends DaoEPBase {
public static final String COL_PART_WIDTH = "PART_WIDTH"; /* 零件-宽*/
public static final String COL_PART_THICK = "PART_THICK"; /* 零件-厚*/
public static final String COL_PART_SPEC = "PART_SPEC"; /* 零件规格*/
public static final String COL_PART_SPEC_ID = "PART_SPEC_ID"; /* 零件规格ID*/
public static final String COL_PRIMARY_ID = "PRIMARY_ID"; /* 主表id*/
public static final String COL_PRICE = "PRICE"; /* 单价*/
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
......@@ -126,7 +129,7 @@ public class HGKC006A extends DaoEPBase {
public static final String UPDATE = "HGKC006A.update";
public static final String DELETE = "HGKC006A.delete";
private Long id = new Long(0);
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
......@@ -170,6 +173,7 @@ public class HGKC006A extends DaoEPBase {
private BigDecimal partWidth = new BigDecimal(0.000); /* 零件-宽*/
private BigDecimal partThick = new BigDecimal(0.000); /* 零件-厚*/
private String partSpec = " "; /* 零件规格*/
private Long partSpecId = new Long(0); /* 规格id*/
private Long primaryId = new Long(0); /* 主表id*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
......@@ -385,6 +389,10 @@ public class HGKC006A extends DaoEPBase {
eiColumn.setDescName("零件规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_SPEC_ID);
eiColumn.setDescName("零件规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRIMARY_ID);
eiColumn.setDescName("主表id");
eiMetadata.addMeta(eiColumn);
......@@ -428,7 +436,7 @@ public class HGKC006A extends DaoEPBase {
/**
* set the id .
*
* @param id
* @param id
*/
public void setId(Long id) {
this.id = id;
......@@ -1185,6 +1193,15 @@ public class HGKC006A extends DaoEPBase {
public void setSource(Integer source) {
this.source = source;
}
public Long getPartSpecId() {
return partSpecId;
}
public void setPartSpecId(Long partSpecId) {
this.partSpecId = partSpecId;
}
/**
* get the value from Map.
*
......@@ -1237,6 +1254,7 @@ public class HGKC006A extends DaoEPBase {
setPartWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_WIDTH)), partWidth));
setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_THICK)), partThick));
setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_SPEC)), partSpec));
setPartSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PART_SPEC_ID)), partSpecId));
setPrimaryId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PRIMARY_ID)), primaryId));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
......@@ -1294,6 +1312,7 @@ public class HGKC006A extends DaoEPBase {
map.put(FIELD_PART_WIDTH, StringUtils.toString(partWidth, eiMetadata.getMeta(FIELD_PART_WIDTH)));
map.put(FIELD_PART_THICK, StringUtils.toString(partThick, eiMetadata.getMeta(FIELD_PART_THICK)));
map.put(FIELD_PART_SPEC, StringUtils.toString(partSpec, eiMetadata.getMeta(FIELD_PART_SPEC)));
map.put(FIELD_PART_SPEC_ID, StringUtils.toString(partSpecId, eiMetadata.getMeta(FIELD_PART_SPEC_ID)));
map.put(FIELD_PRIMARY_ID, StringUtils.toString(primaryId, eiMetadata.getMeta(FIELD_PRIMARY_ID)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
......
......@@ -22,7 +22,7 @@ public class HGKC007A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
......@@ -66,12 +66,13 @@ public class HGKC007A extends DaoEPBase {
public static final String FIELD_PART_WIDTH = "partWidth"; /* 零件-宽*/
public static final String FIELD_PART_THICK = "partThick"; /* 零件-厚*/
public static final String FIELD_PART_SPEC = "partSpec"; /* 零件规格*/
public static final String FIELD_PART_SPEC_ID = "partSpecId"; /* 零件规格ID*/
public static final String FIELD_PRIMARY_ID = "primaryId"; /* 主表id*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_SOURCE = "source"; /* 数据来源*/
public static final String COL_ID = "ID";
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
......@@ -115,6 +116,7 @@ public class HGKC007A extends DaoEPBase {
public static final String COL_PART_WIDTH = "PART_WIDTH"; /* 零件-宽*/
public static final String COL_PART_THICK = "PART_THICK"; /* 零件-厚*/
public static final String COL_PART_SPEC = "PART_SPEC"; /* 零件规格*/
public static final String COL_PART_SPEC_ID = "PART_SPEC_ID"; /* 零件规格ID*/
public static final String COL_PRIMARY_ID = "PRIMARY_ID"; /* 主表id*/
public static final String COL_PRICE = "PRICE"; /* 单价*/
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
......@@ -126,7 +128,7 @@ public class HGKC007A extends DaoEPBase {
public static final String UPDATE = "HGKC007A.update";
public static final String DELETE = "HGKC007A.delete";
private Long id = new Long(0);
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
......@@ -170,6 +172,7 @@ public class HGKC007A extends DaoEPBase {
private BigDecimal partWidth = new BigDecimal(0.000); /* 零件-宽*/
private BigDecimal partThick = new BigDecimal(0.000); /* 零件-厚*/
private String partSpec = " "; /* 零件规格*/
private Long partSpecId = new Long(0); /* 规格id*/
private Long primaryId = new Long(0); /* 主表id*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
......@@ -385,6 +388,10 @@ public class HGKC007A extends DaoEPBase {
eiColumn.setDescName("零件规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_SPEC_ID);
eiColumn.setDescName("零件规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRIMARY_ID);
eiColumn.setDescName("主表id");
eiMetadata.addMeta(eiColumn);
......@@ -428,7 +435,7 @@ public class HGKC007A extends DaoEPBase {
/**
* set the id .
*
* @param id
* @param id
*/
public void setId(Long id) {
this.id = id;
......@@ -1185,6 +1192,15 @@ public class HGKC007A extends DaoEPBase {
public void setSource(Integer source) {
this.source = source;
}
public Long getPartSpecId() {
return partSpecId;
}
public void setPartSpecId(Long partSpecId) {
this.partSpecId = partSpecId;
}
/**
* get the value from Map.
*
......@@ -1238,6 +1254,7 @@ public class HGKC007A extends DaoEPBase {
setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_THICK)), partThick));
setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_SPEC)), partSpec));
setPrimaryId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PRIMARY_ID)), primaryId));
setPartSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PART_SPEC_ID)), partSpecId));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SOURCE)), source));
......@@ -1294,6 +1311,7 @@ public class HGKC007A extends DaoEPBase {
map.put(FIELD_PART_WIDTH, StringUtils.toString(partWidth, eiMetadata.getMeta(FIELD_PART_WIDTH)));
map.put(FIELD_PART_THICK, StringUtils.toString(partThick, eiMetadata.getMeta(FIELD_PART_THICK)));
map.put(FIELD_PART_SPEC, StringUtils.toString(partSpec, eiMetadata.getMeta(FIELD_PART_SPEC)));
map.put(FIELD_PART_SPEC_ID, StringUtils.toString(partSpecId, eiMetadata.getMeta(FIELD_PART_SPEC_ID)));
map.put(FIELD_PRIMARY_ID, StringUtils.toString(primaryId, eiMetadata.getMeta(FIELD_PRIMARY_ID)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
......
......@@ -8,9 +8,9 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.domain.HGKC006;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC006;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
......@@ -21,11 +21,10 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.math.BigDecimal;
import java.util.*;
/**
* 其他入库单
......@@ -34,7 +33,7 @@ import java.util.Map;
* @date:2024/1/15,11:20
*/
public class ServiceHGKC006 extends ServiceBase {
/**
* 画面初始化
*
......@@ -56,7 +55,7 @@ public class ServiceHGKC006 extends ServiceBase {
}
return inInfo;
}
/**
* 查询数据列表
*
......@@ -77,7 +76,7 @@ public class ServiceHGKC006 extends ServiceBase {
}
/**
* 保存操作.
*
......@@ -96,7 +95,6 @@ public class ServiceHGKC006 extends ServiceBase {
hgkc006.fromMap(resultRows.get(i));
hgkc006.setOtherEnterDate(DateUtils.formatShort(hgkc006.getOtherEnterDate()));
if (hgkc006.getId() == null || hgkc006.getId() == 0) {
hgkc006.setSubmitStatus(HGConstant.ProductStatus.WTJ);
this.add(hgkc006);
} else {
this.modify(hgkc006);
......@@ -110,7 +108,7 @@ public class ServiceHGKC006 extends ServiceBase {
}
return inInfo;
}
/**
* 校验保存的数据
*
......@@ -121,10 +119,17 @@ public class ServiceHGKC006 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HGKC006 hgkc006 = new HGKC006();
hgkc006.fromMap(resultRows.get(i));
AssertUtils.isNull(hgkc006.getSubmitStatus(), "是否启用不能为空");
if(Objects.nonNull(hgkc006.getId())&&hgkc006.getId()>0){
AssertUtils.isTrue(hgkc006.getSubmitStatus().compareTo(HGConstant.ProductStatus.YTJ) == 0,"领料单已提交,不可修改");
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(hgkc006.getCompanyCode(), "请选择公司!");
AssertUtils.isEmpty(hgkc006.getWhCode(), "请选择仓库信息!");
AssertUtils.isEmpty(hgkc006.getWhName(), "请选择仓库信息!");
}
}
/**
* 新增
*
......@@ -136,10 +141,11 @@ public class ServiceHGKC006 extends ServiceBase {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc006.setCompanyCode(userVO.getUsercode());
hgkc006.setCompanyName(userVO.getUsername());
hgkc006.setSource(1);
hgkc006.setSource(HGConstant.RKSource.SDLR);
hgkc006.setSubmitStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGKC006.INSERT, hgkc006);
}
/**
* 修改数据
*
......@@ -163,6 +169,18 @@ public class ServiceHGKC006 extends ServiceBase {
hgkc006.fromMap(map);
DaoUtils.update(HGKC006.CHECK, hgkc006.toMap());
}
List<HGKC006A> hgkc006AList = HGKCTools.HgKc006A.getHgkc006aList(hgkc006.getId());
AssertUtils.isEmpty(hgkc006AList, "没有明细信息无法提交");
if(!CollectionUtils.isEmpty(hgkc006AList)){
for(HGKC006A hgkc006A : hgkc006AList){
//增加库存
HGKCUtils.HgKc010.updateInv(hgkc006A.getCompanyCode(),hgkc006A.getWhCode(),
hgkc006A.getPartSpecId(),hgkc006A.getInvQty(),
hgkc006A.getInvUnitWeight(),hgkc006A.getInvWeight());
}
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("提交成功!");
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("提交失败,原因参见详细错误描述!");
......@@ -170,66 +188,9 @@ public class ServiceHGKC006 extends ServiceBase {
logError("提交失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("提交成功!");
return eiInfo;
}
/**
* 新增操作.
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "其他入库单", operType = "新增", operDesc = "新增")
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HGKC006 hgkc006 = new HGKC006();
hgkc006.fromMap(resultRows.get(i));
this.add(hgkc006);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "其他入库单", operType = "修改", operDesc = "修改操作")
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
for (int i = 0; i < resultRows.size(); i++) {
HGKC006 hppz009 = new HGKC006();
hppz009.fromMap(resultRows.get(i));
DaoUtils.update(HGKC006.UPDATE, hppz009);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作
*
......@@ -258,5 +219,5 @@ public class ServiceHGKC006 extends ServiceBase {
}
return inInfo;
}
}
......@@ -3,26 +3,18 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.domain.HGKC006;
import com.baosight.hggp.hg.kc.domain.HGKC006A;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
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.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 其他入库单明细
......@@ -31,7 +23,7 @@ import java.util.Map;
* @date:2024/1/15,11:20
*/
public class ServiceHGKC006A extends ServiceBase {
/**
* 画面初始化
*
......@@ -42,15 +34,22 @@ public class ServiceHGKC006A extends ServiceBase {
@OperationLogAnnotation(operModul = "其他入库单明细", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID), null, false);
String whCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_WH_CODE);
String companyCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_COMPANY_CODE);
Map map = new HashMap();
map.put(HGKC006A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC006A.FIELD_WH_CODE, whCode);
map.put(HGKC006A.FIELD_COMPANY_CODE, companyCode);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false
);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC006A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
......@@ -62,12 +61,21 @@ public class ServiceHGKC006A extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGKC006A.QUERY, new HGKC006A());
String whCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_WH_CODE);
String companyCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_COMPANY_CODE);
Map map = new HashMap();
map.put(HGKC006A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC006A.FIELD_WH_CODE, whCode);
map.put(HGKC006A.FIELD_COMPANY_CODE, companyCode);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false
);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 保存操作.
*
......@@ -77,98 +85,58 @@ public class ServiceHGKC006A extends ServiceBase {
@OperationLogAnnotation(operModul = "其他入库单明细", operType = "插入", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGKC006A hgkc006A = new HGKC006A();
hgkc006A.fromMap(resultRows.get(i));
if (hgkc006A.getId() == null || hgkc006A.getId() == 0) {
Map queryMap = new HashMap();
queryMap.put("id",inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_PRIMARY_ID));
List<HGKC006> list = this.dao.query(HGKC006.QUERY,queryMap);
this.add(hgkc006A,list.get(0));
} else {
this.modify(hgkc006A);
}
Map resultMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
HGKC006A hgkc006a = new HGKC006A();
hgkc006a.fromMap(resultMap);
//查询主单
HGKC006 hgkc006 = HGKCTools.HgKc006.getById(hgkc006a.getPrimaryId());
this.checkSaveData(hgkc006a,hgkc006);
this.setData(hgkc006a,hgkc006);
if(Objects.nonNull(hgkc006a.getId())&&hgkc006a.getId()!=0){
DaoUtils.update(HGKC006A.UPDATE, hgkc006a);
}else {
hgkc006a.setPrimaryId(hgkc006.getId());
hgkc006a.setOtherEnterNo(hgkc006.getOtherEnterNo());
DaoUtils.insert(HGKC006A.INSERT, hgkc006a);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private void checkSaveData(List<Map> resultRows) {
// 数据校验
for (int i = 0; i < resultRows.size(); i++) {
HGKC006A hgkc006A = new HGKC006A();
hgkc006A.fromMap(resultRows.get(i));
//AssertUtils.isNull(hgkc006A.s(), "是否启用不能为空");
private void setData(HGKC006A hgkc006a, HGKC006 hgkc006) {
if(Objects.nonNull(hgkc006)){
hgkc006a.setProjCode(hgkc006.getProjCode());
hgkc006a.setProjName(hgkc006.getProjName());
hgkc006a.setWhCode(hgkc006.getWhCode());
hgkc006a.setWhName(hgkc006.getWhName());
hgkc006a.setCompanyCode(hgkc006.getCompanyCode());
hgkc006a.setCompanyName(hgkc006.getCompanyName());
hgkc006a.setSource(hgkc006.getSource());
}
}
/**
* 新增
*
* @param hgkc006A
* @throws Exception
*/
private void add(HGKC006A hgkc006A,HGKC006 hgkc006) throws Exception {
hgkc006A.setPrimaryId(hgkc006.getId());
hgkc006A.setSource(1);
hgkc006A.setOtherEnterNo(hgkc006.getOtherEnterNo());
DaoUtils.insert(HGKC006A.INSERT, hgkc006A);
// 更新库存数量
HGKCUtils.HgKc010.updateInv(hgkc006.getCompanyCode(), hgkc006.getWhCode(), hgkc006A.getInventRecordId(),
hgkc006A.getInvQty(), hgkc006A.getInvUnitWeight(), hgkc006A.getInvWeight());
}
/**
* 修改数据
*
* @param hgkc006A
*/
private void modify(HGKC006A hgkc006A) {
DaoUtils.update(HGKC006A.UPDATE, hgkc006A);
}
/**
* 修改操作
*
* @param inInfo
* @return
* 校验保存的数据
*/
@OperationLogAnnotation(operModul = "其他入库单明细", operType = "修改", operDesc = "修改操作")
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
for (int i = 0; i < resultRows.size(); i++) {
HGKC006A hppz009 = new HGKC006A();
hppz009.fromMap(resultRows.get(i));
DaoUtils.update(HGKC006A.UPDATE, hppz009);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
private void checkSaveData(HGKC006A hgkc006a,HGKC006 hgkc006) {
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isNull(hgkc006a.getPrimaryId(), "未获取到其他入库单ID信息");
HGKC010 hgkc010 = HGKCTools.HgKc010.get(hgkc006a.getCompanyCode(),hgkc006a.getWhCode(),hgkc006a.getPartSpecId());
if (hgkc010==null){
throw new PlatException("实时库存不存在!");
}
int result = hgkc006a.getInvQty().compareTo(hgkc010.getInvQty());
if ( result > 0){
throw new PlatException("实时库存数量不够,无法保存!");
}
return inInfo;
}
/**
* 删除操作
*
......@@ -182,18 +150,7 @@ public class ServiceHGKC006A extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HGKC006A hgkc006A = new HGKC006A();
hgkc006A.fromMap(resultRows.get(i));
// 校验企业下是否存在用户
int count = HGXSTools.XsUser.countByAccount(hgkc006A.getAccountCode());
if (count > 0) {
// throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgkc006A.getAccountName()));
}
DaoUtils.update(HGKC006A.DELETE, hgkc006A);
// 扣减库存
Map queryMap = new HashMap();
queryMap.put("id",inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_PRIMARY_ID));
List<HGKC006> list = this.dao.query(HGKC006.QUERY,queryMap);
HGKCUtils.HgKc010.updateInv(list.get(0).getCompanyCode(), list.get(0).getWhCode(), hgkc006A.getInventRecordId(),
hgkc006A.getInvQty().negate(), hgkc006A.getInvWeight().negate());
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......@@ -203,5 +160,5 @@ public class ServiceHGKC006A extends ServiceBase {
}
return inInfo;
}
}
......@@ -8,10 +8,10 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
......@@ -22,7 +22,9 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
......@@ -35,7 +37,7 @@ import java.util.Map;
* @date:2024/1/15,11:20
*/
public class ServiceHGKC007 extends ServiceBase {
/**
* 画面初始化
*
......@@ -57,7 +59,7 @@ public class ServiceHGKC007 extends ServiceBase {
}
return inInfo;
}
/**
* 查询数据列表
*
......@@ -78,7 +80,7 @@ public class ServiceHGKC007 extends ServiceBase {
}
/**
* 保存操作.
*
......@@ -111,7 +113,7 @@ public class ServiceHGKC007 extends ServiceBase {
}
return inInfo;
}
/**
* 校验保存的数据
*
......@@ -125,7 +127,7 @@ public class ServiceHGKC007 extends ServiceBase {
AssertUtils.isNull(hgkc007.getSubmitStatus(), "是否启用不能为空");
}
}
/**
* 新增
*
......@@ -137,10 +139,10 @@ public class ServiceHGKC007 extends ServiceBase {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc007.setCompanyCode(userVO.getUsercode());
hgkc007.setCompanyName(userVO.getUsername());
hgkc007.setSource(1);
hgkc007.setSource(HGConstant.CKSource.SDLR);
DaoUtils.insert(HGKC007.INSERT, hgkc007);
}
/**
* 修改数据
*
......@@ -163,6 +165,22 @@ public class ServiceHGKC007 extends ServiceBase {
hgkc007.fromMap(map);
DaoUtils.update(HGKC007.CHECK, hgkc007.toMap());
}
List<HGKC007A> hgkc007AList = HGKCTools.HgKc007A.getHgkc007aList(hgkc007.getId());
AssertUtils.isEmpty(hgkc007AList, "没有明细信息无法提交");
if(!CollectionUtils.isEmpty(hgkc007AList)){
for(HGKC007A hgkc007A : hgkc007AList){
//需要为负数
BigDecimal qty = hgkc007A.getInvQty().multiply(new BigDecimal(-1));
BigDecimal invUnitWeight = hgkc007A.getInvUnitWeight().multiply(new BigDecimal(-1));
BigDecimal invWeight = hgkc007A.getInvWeight().multiply(new BigDecimal(-1));
//减少库存
HGKCUtils.HgKc010.updateInv(hgkc007A.getCompanyCode(),hgkc007A.getWhCode(),
hgkc007A.getPartSpecId(),qty,
invUnitWeight,invWeight);
}
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("提交成功!");
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("提交失败,原因参见详细错误描述!");
......@@ -170,11 +188,9 @@ public class ServiceHGKC007 extends ServiceBase {
logError("提交失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("提交成功!");
return eiInfo;
}
/**
* 新增操作.
*
......@@ -203,7 +219,7 @@ public class ServiceHGKC007 extends ServiceBase {
return inInfo;
}
/**
* 修改操作
*
......@@ -229,7 +245,7 @@ public class ServiceHGKC007 extends ServiceBase {
}
return inInfo;
}
/**
* 删除操作
*
......@@ -258,5 +274,5 @@ public class ServiceHGKC007 extends ServiceBase {
}
return inInfo;
}
}
......@@ -3,16 +3,18 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
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.kc.domain.HGKC006;
import com.baosight.hggp.hg.kc.domain.HGKC006A;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.HGKC007A;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -21,10 +23,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 其他出库明细
......@@ -33,7 +32,7 @@ import java.util.Map;
* @date:2024/1/15,11:20
*/
public class ServiceHGKC007A extends ServiceBase {
/**
* 画面初始化
*
......@@ -44,15 +43,22 @@ public class ServiceHGKC007A extends ServiceBase {
@OperationLogAnnotation(operModul = "其他出库明细", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID), null, false);
String whCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_WH_CODE);
String companyCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_COMPANY_CODE);
Map map = new HashMap();
map.put(HGKC007A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC007A.FIELD_WH_CODE, whCode);
map.put(HGKC007A.FIELD_COMPANY_CODE, companyCode);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false
);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
......@@ -64,12 +70,21 @@ public class ServiceHGKC007A extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGKC007A.QUERY, new HGKC007A());
String whCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_WH_CODE);
String companyCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_COMPANY_CODE);
Map map = new HashMap();
map.put(HGKC007A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC007A.FIELD_WH_CODE, whCode);
map.put(HGKC007A.FIELD_COMPANY_CODE, companyCode);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false
);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 保存操作.
*
......@@ -79,97 +94,57 @@ public class ServiceHGKC007A extends ServiceBase {
@OperationLogAnnotation(operModul = "其他出库明细", operType = "插入", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGKC007A hgkc007A = new HGKC007A();
hgkc007A.fromMap(resultRows.get(i));
if (hgkc007A.getId() == null || hgkc007A.getId() == 0) {
Map queryMap = new HashMap();
queryMap.put("id",inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_PRIMARY_ID));
List<HGKC007> list = this.dao.query(HGKC007.QUERY,queryMap);
this.add(hgkc007A,list.get(0));
} else {
this.modify(hgkc007A);
}
Map resultMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
HGKC007A hgkc007a = new HGKC007A();
hgkc007a.fromMap(resultMap);
//查询主单
HGKC007 hgkc007 = HGKCTools.HgKc007.getById(hgkc007a.getPrimaryId());
this.checkSaveData(hgkc007a,hgkc007);
this.setData(hgkc007a,hgkc007);
if(Objects.nonNull(hgkc007a.getId())&&hgkc007a.getId()!=0){
DaoUtils.update(HGKC007A.UPDATE, hgkc007a);
}else {
hgkc007a.setPrimaryId(hgkc007.getId());
hgkc007a.setOtherOutNo(hgkc007.getOtherOutNo());
DaoUtils.insert(HGKC007A.INSERT, hgkc007a);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private void checkSaveData(List<Map> resultRows) {
// 数据校验
for (int i = 0; i < resultRows.size(); i++) {
HGKC007A hgkc007A = new HGKC007A();
hgkc007A.fromMap(resultRows.get(i));
//AssertUtils.isNull(hgkc007A.getStatus(), "是否启用不能为空");
private void setData(HGKC007A hgkc007a, HGKC007 hgkc007) {
if(Objects.nonNull(hgkc007)){
hgkc007a.setProjCode(hgkc007.getProjCode());
hgkc007a.setProjName(hgkc007.getProjName());
hgkc007a.setWhCode(hgkc007.getWhCode());
hgkc007a.setWhName(hgkc007.getWhName());
hgkc007a.setCompanyCode(hgkc007.getCompanyCode());
hgkc007a.setCompanyName(hgkc007.getCompanyName());
hgkc007a.setSource(hgkc007.getSource());
}
}
/**
* 新增
*
* @param hgkc007A
* @throws Exception
*/
private void add(HGKC007A hgkc007A,HGKC007 hgkc007) throws Exception {
hgkc007A.setPrimaryId(hgkc007.getId());
hgkc007A.setSource(1);
hgkc007A.setOtherOutNo(hgkc007.getOtherOutNo());
DaoUtils.insert(HGKC007A.INSERT, hgkc007A);
// 更新库存数量
HGKCUtils.HgKc010.updateInv(hgkc007.getCompanyCode(), hgkc007.getWhCode(), hgkc007A.getInventRecordId(),
hgkc007A.getInvQty().negate(), hgkc007A.getInvUnitWeight().negate(), hgkc007A.getInvWeight().negate());
}
/**
* 修改数据
*
* @param hgkc007A
*/
private void modify(HGKC007A hgkc007A) {
DaoUtils.update(HGKC007A.UPDATE, hgkc007A);
}
/**
* 修改操作
*
* @param inInfo
* @return
* 校验保存的数据
*/
@OperationLogAnnotation(operModul = "其他出库明细", operType = "修改", operDesc = "修改操作")
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
for (int i = 0; i < resultRows.size(); i++) {
HGKC007A hppz009 = new HGKC007A();
hppz009.fromMap(resultRows.get(i));
DaoUtils.update(HGKC007A.UPDATE, hppz009);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
private void checkSaveData(HGKC007A hgkc007a, HGKC007 hgkc007) {
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isNull(hgkc007a.getPrimaryId(), "未获取到其他出库单ID信息");
HGKC010 hgkc010 = HGKCTools.HgKc010.get(hgkc007a.getCompanyCode(),hgkc007a.getWhCode(),hgkc007a.getPartSpecId());
if (hgkc010==null){
throw new PlatException("实时库存不存在!");
}
int result = hgkc007a.getInvQty().compareTo(hgkc010.getInvQty());
if ( result > 0){
throw new PlatException("实时库存数量不够,无法保存!");
}
return inInfo;
}
/**
* 删除操作
*
......@@ -183,18 +158,7 @@ public class ServiceHGKC007A extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HGKC007A hgkc007A = new HGKC007A();
hgkc007A.fromMap(resultRows.get(i));
// 校验企业下是否存在用户
int count = HGXSTools.XsUser.countByAccount(hgkc007A.getAccountCode());
if (count > 0) {
// throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgkc007A.getAccountName()));
}
DaoUtils.update(HGKC007A.DELETE, hgkc007A);
// 扣减库存
Map queryMap = new HashMap();
queryMap.put("id",inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_PRIMARY_ID));
List<HGKC007> list = this.dao.query(HGKC007.QUERY,queryMap);
HGKCUtils.HgKc010.updateInv(list.get(0).getCompanyCode(), list.get(0).getWhCode(), hgkc007A.getInventRecordId(),
hgkc007A.getInvQty(), hgkc007A.getInvWeight());
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......@@ -204,5 +168,5 @@ public class ServiceHGKC007A extends ServiceBase {
}
return inInfo;
}
}
......@@ -5,6 +5,9 @@ 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.kc.domain.HGKC008;
import com.baosight.hggp.hg.kc.domain.HGKC008A;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -13,7 +16,9 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.*;
......@@ -122,6 +127,19 @@ public class ServiceHGKC008 extends ServiceBase {
hgkc008.fromMap(map);
DaoUtils.update(HGKC008.UPDATE_STATUS, hgkc008);
}
List<HGKC008A> hgkc008AList = HGKCTools.HgKc008A.getHgkc008aList(hgkc008.getId());
if(!CollectionUtils.isEmpty(hgkc008AList)){
for(HGKC008A hgkc008A : hgkc008AList){
//领料如果是正数则为出库,需要减少库存,如果是退回则要加库存
BigDecimal qty = hgkc008A.getInvQty().multiply(new BigDecimal(-1));
BigDecimal invUnitWeight = hgkc008A.getInvUnitWeight().multiply(new BigDecimal(-1));
BigDecimal invWeight = hgkc008A.getInvWeight().multiply(new BigDecimal(-1));
//增加库存
HGKCUtils.HgKc010.updateInv(hgkc008A.getCompanyCode(),hgkc008A.getWhCode(),
hgkc008A.getInvSpecId(),qty,
invUnitWeight,invWeight);
}
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
......
......@@ -111,6 +111,8 @@ public class ServiceHGKC008A extends ServiceBase {
hgkc008a.setProjName(hgkc008.getProjName());
hgkc008a.setWhCode(hgkc008.getWhCode());
hgkc008a.setWhName(hgkc008.getWhName());
hgkc008a.setCompanyCode(hgkc008.getCompanyCode());
hgkc008a.setCompanyName(hgkc008.getCompanyName());
if(hgkc008.getReceiveType().compareTo(HGConstant.ReceiveType.DEFAULT) == 0){
//如果明细里面有负数的,主表就是退库
if(hgkc008a.getInvQty().compareTo(BigDecimal.ZERO) < 0){
......
......@@ -74,10 +74,12 @@ public class ServiceHGKC010 extends ServiceBase {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String whCode = MapUtils.getString(queryMap, HGKC010.FIELD_WH_CODE);
String inventType = MapUtils.getString(queryMap, HGKC010.FIELD_INVENT_TYPE);
String companyCode = MapUtils.getString(queryMap, HGKC010.FIELD_COMPANY_CODE);
Map map = new HashMap();
map.put(HGKC010.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC010.FIELD_WH_CODE, whCode);
map.put(HGKC010.FIELD_INVENT_TYPE, inventType);
map.put(HGKC010.FIELD_COMPANY_CODE, companyCode);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID), map,false);
return inInfo;
......
......@@ -215,7 +215,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-24 16:39:30
Version : 1.0
schema : hggp
tableName : HGKC006A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
OTHER_ENTER_DATE VARCHAR,
OTHER_ENTER_NO VARCHAR NOT NULL,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
INVENT_RECORD_ID BIGINT,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
INV_QTY DECIMAL,
INV_UNIT_WEIGHT DECIMAL,
INV_WEIGHT DECIMAL,
OTHER_ENTER_NO_OLD VARCHAR,
REMARK VARCHAR,
FACTORY_CODE VARCHAR,
PROD_ORDER_NO VARCHAR,
PROD_TASK_NO VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRDT_TYPE TINYINT,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PRDT_LENGTH DECIMAL,
PRDT_WIDTH DECIMAL,
PRDT_THICK DECIMAL,
PRDT_SPEC VARCHAR,
PART_TYPE TINYINT,
PART_CODE VARCHAR,
PART_NAME VARCHAR,
PART_LENGTH DECIMAL,
PART_WIDTH DECIMAL,
PART_THICK DECIMAL,
PART_SPEC VARCHAR,
PRIMARY_ID BIGINT,
PRICE DECIMAL,
AMOUNT DECIMAL,
SOURCE TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGKC006A">
<sql id="condition">
......@@ -188,6 +135,9 @@
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpecId">
PART_SPEC_ID = #partSpecId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="primaryId">
PRIMARY_ID = #primaryId#
</isNotEmpty>
......@@ -205,7 +155,7 @@
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC006A">
SELECT
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
......@@ -249,6 +199,7 @@
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
PART_SPEC_ID as "partSpecId", <!-- 零件规格id -->
PRIMARY_ID as "primaryId", <!-- 主表id -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
......@@ -260,7 +211,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......@@ -271,152 +222,6 @@
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterDate">
OTHER_ENTER_DATE = #otherEnterDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNo">
OTHER_ENTER_NO = #otherEnterNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invUnitWeight">
INV_UNIT_WEIGHT = #invUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invWeight">
INV_WEIGHT = #invWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNoOld">
OTHER_ENTER_NO_OLD = #otherEnterNoOld#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtLength">
PRDT_LENGTH = #prdtLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtWidth">
PRDT_WIDTH = #prdtWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtThick">
PRDT_THICK = #prdtThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtSpec">
PRDT_SPEC = #prdtSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partType">
PART_TYPE = #partType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCode">
PART_CODE = #partCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
PART_NAME = #partName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partLength">
PART_LENGTH = #partLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partWidth">
PART_WIDTH = #partWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partThick">
PART_THICK = #partThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="primaryId">
PRIMARY_ID = #primaryId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC006A (ID,
......@@ -463,12 +268,13 @@
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
PART_SPEC_ID, <!-- 零件规格id -->
PRIMARY_ID, <!-- 主表id -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
SOURCE <!-- 数据来源 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherEnterDate#, #otherEnterNo#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invQty#, #invUnitWeight#, #invWeight#, #otherEnterNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #primaryId#, #price#, #amount#, #source#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherEnterDate#, #otherEnterNo#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invQty#, #invUnitWeight#, #invWeight#, #otherEnterNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#,#partSpecId#, #primaryId#, #price#, #amount#, #source#)
</insert>
<delete id="delete">
......@@ -521,6 +327,7 @@
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
PART_SPEC_ID = #partSpecId#, <!-- 零件规格id -->
PRIMARY_ID = #primaryId#, <!-- 主表id -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
......
......@@ -215,7 +215,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-24 16:31:37
Version : 1.0
schema : hggp
tableName : HGKC007A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
OTHER_OUT_DATE VARCHAR,
OTHER_OUT_NO VARCHAR NOT NULL,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
INVENT_RECORD_ID BIGINT,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
INV_QTY DECIMAL,
INV_UNIT_WEIGHT DECIMAL,
INV_WEIGHT DECIMAL,
OTHER_OUT_NO_OLD VARCHAR,
REMARK VARCHAR,
FACTORY_CODE VARCHAR,
PROD_ORDER_NO VARCHAR,
PROD_TASK_NO VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRDT_TYPE TINYINT,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PRDT_LENGTH DECIMAL,
PRDT_WIDTH DECIMAL,
PRDT_THICK DECIMAL,
PRDT_SPEC VARCHAR,
PART_TYPE TINYINT,
PART_CODE VARCHAR,
PART_NAME VARCHAR,
PART_LENGTH DECIMAL,
PART_WIDTH DECIMAL,
PART_THICK DECIMAL,
PART_SPEC VARCHAR,
PRIMARY_ID BIGINT,
PRICE DECIMAL,
AMOUNT DECIMAL,
SOURCE TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGKC007A">
<sql id="condition">
......@@ -188,6 +135,9 @@
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpecId">
PART_SPEC_ID = #partSpecId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="primaryId">
PRIMARY_ID = #primaryId#
</isNotEmpty>
......@@ -205,7 +155,7 @@
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC007A">
SELECT
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
......@@ -249,6 +199,7 @@
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
PART_SPEC_ID as "partSpecId", <!-- 零件规格id -->
PRIMARY_ID as "primaryId", <!-- 主表id -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
......@@ -260,7 +211,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......@@ -271,153 +222,6 @@
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutDate">
OTHER_OUT_DATE = #otherOutDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNo">
OTHER_OUT_NO = #otherOutNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invUnitWeight">
INV_UNIT_WEIGHT = #invUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invWeight">
INV_WEIGHT = #invWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNoOld">
OTHER_OUT_NO_OLD = #otherOutNoOld#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtLength">
PRDT_LENGTH = #prdtLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtWidth">
PRDT_WIDTH = #prdtWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtThick">
PRDT_THICK = #prdtThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtSpec">
PRDT_SPEC = #prdtSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partType">
PART_TYPE = #partType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCode">
PART_CODE = #partCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
PART_NAME = #partName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partLength">
PART_LENGTH = #partLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partWidth">
PART_WIDTH = #partWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partThick">
PART_THICK = #partThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="primaryId">
PRIMARY_ID = #primaryId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC007A (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
......@@ -463,12 +267,13 @@
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
PART_SPEC_ID, <!-- 零件规格id -->
PRIMARY_ID, <!-- 主表id -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
SOURCE <!-- 数据来源 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherOutDate#, #otherOutNo#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invQty#, #invUnitWeight#, #invWeight#, #otherOutNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #primaryId#, #price#, #amount#, #source#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherOutDate#, #otherOutNo#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invQty#, #invUnitWeight#, #invWeight#, #otherOutNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #partSpecId#,#primaryId#, #price#, #amount#, #source#)
</insert>
<delete id="delete">
......@@ -521,6 +326,7 @@
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
PART_SPEC_ID = #partSpecId#, <!-- 零件规格id -->
PRIMARY_ID = #primaryId#, <!-- 主表id -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
......
......@@ -95,6 +95,9 @@
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
......
......@@ -316,6 +316,42 @@ public class HGKCTools {
}
}
public static class HgKc006 {
public static HGKC006 getById(Long id) {
AssertUtils.isEmpty(Collections.singleton(id), "ID为空!");
HGKC006 result = (HGKC006) DaoBase.getInstance().get(HGKC006.QUERY, HGKC006.FIELD_ID, id);
return result;
}
}
public static class HgKc006A {
public static List<HGKC006A> getHgkc006aList(Long primaryId) {
Map paramMap = new HashMap();
paramMap.put("primaryId", primaryId);
List<HGKC006A> results = DaoBase.getInstance().query(HGKC006A.QUERY, paramMap);
return results;
}
}
public static class HgKc007 {
public static HGKC007 getById(Long id) {
AssertUtils.isEmpty(Collections.singleton(id), "ID为空!");
HGKC007 result = (HGKC007) DaoBase.getInstance().get(HGKC007.QUERY, HGKC007.FIELD_ID, id);
return result;
}
}
public static class HgKc007A {
public static List<HGKC007A> getHgkc007aList(Long primaryId) {
Map paramMap = new HashMap();
paramMap.put("primaryId", primaryId);
List<HGKC007A> results = DaoBase.getInstance().query(HGKC007A.QUERY, paramMap);
return results;
}
}
public static class HgKc008 {
public static HGKC008 getById(Long id) {
......@@ -342,6 +378,13 @@ public class HGKCTools {
}
public static List<HGKC008A> getHgkc008aList(Long receiveId) {
Map paramMap = new HashMap();
paramMap.put("receiveId", receiveId);
List<HGKC008A> results = DaoBase.getInstance().query(HGKC008A.QUERY, paramMap);
return results;
}
}
/**
......
......@@ -301,6 +301,18 @@ public class ServiceHGPZ005 extends ServiceBase {
return inInfo;
}
public EiInfo queryInventNameBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_NAME_BOX_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "存货档案",operType = "导入",operDesc = "导入操作")
public EiInfo importDate(EiInfo inInfo) {
try {
......
......@@ -386,6 +386,25 @@
<include refid="condition"/>
ORDER BY ID
</select>
<select id="queryInventNameBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
INVENT_CODE as "inventCode",
CONCAT('[',INVENT_CODE,']',INVENT_NAME,(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END)) as "inventText",
INVENT_NAME as "inventName",
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec",
INVENT_TYPE as "inventType",
LENGTH AS "length" , <!-- 长 -->
WIDTH AS "width" , <!-- 宽 -->
THICK AS "thick" , <!-- 厚 -->
COEFFICIENT AS "coefficient", <!-- 系数 -->
ID AS "id"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
AND STATUS = 1
<include refid="condition"/>
ORDER BY INVENT_CODE
</select>
<!---->
<select id="queryInventBoxAll" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
......
......@@ -25,6 +25,8 @@ public class ServiceHGSC005A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
String planCode = inInfo.getCellStr(EiConstant.queryBlock,0,HGSC005A.FIELD_plan_code);
HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(planCode);
inInfo.setCell(EiConstant.queryBlock,0,HGSC005.FIELD_is_schedule,hgsc005.getIsSchedule());
inInfo = super.query(inInfo, HGSC005A.QUERY, new HGSC005A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PLAN_PROCESS_BLOCK_ID), new HashMap<String, Object>(){{
put(HGSC005A.FIELD_plan_code,planCode);
......
......@@ -112,7 +112,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
id asc
id desc
</isEmpty>
</dynamic>
......
......@@ -111,7 +111,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
id asc
id desc
</isEmpty>
</dynamic>
......
package com.baosight.hggp.hg.zl.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.CheckTypeEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.zl.domain.HGZL003;
import com.baosight.hggp.hg.zl.tools.HGZLTools;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author wwl
* @date 2025年05月29日 17:18
*/
public class ServiceHGZL003 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "日常巡检单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL003.QUERY, new HGZL003());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
// EiInfoUtils.addBlock(inInfo,"workUserBlockId", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class);
CommonMethod.objConvertComboBox(UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()),inInfo, "workUserBlockId","loginName","userName");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "日常巡检单", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL003.QUERY, new HGZL003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "日常巡检单", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<HGZL003> hgzl003List = MapUtils.toDaoEPBase(inInfo,HGZL003.class);
hgzl003List.forEach( o -> {
HGZLTools.THGZL003.add(o);
});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + hgzl003List.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
@Override
@OperationLogAnnotation(operModul = "日常巡检单", operType = "删除", operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Long> ids = ObjectUtils.listKey(resultRows, HGZL003.FIELD_id).stream().map(id -> Long.parseLong(String.valueOf(id))).collect(Collectors.toList());
DaoUtils.update(HGZL003.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
HGZLTools.THGZL004.deleteByCheckIds(ids, CheckTypeEnum.POLLING_CHECK);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 用户下拉框
* @param inInfo
* @return
*/
public EiInfo workUserComboBox(EiInfo inInfo) throws InstantiationException, IllegalAccessException {
String groupCode = inInfo.getCellStr(EiConstant.queryBlock,EiConstant.STATUS_DEFAULT, HGZL003.FIELD_group_code);
// EiInfoUtils.addBlock(inInfo,"workUserBlockId", HGXSTools.XsUser.queryByOrg(new ArrayList<String>(){{add(groupCode);}}), User.class);
CommonMethod.objConvertComboBox(HGXSTools.XsUser.queryByOrg(new ArrayList<String>(){{add(groupCode);}}),inInfo, "workUserBlockId","loginName","userName");
return inInfo;
}
}
package com.baosight.hggp.hg.zl.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
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;
/**
* @author wwl
* @version 1.0 2024/5/24
*/
public class ServiceHGZL003A extends ServiceEPBase {
@OperationLogAnnotation(operModul = "日常巡检单-生产任务", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/*
* 查询*/
@OperationLogAnnotation(operModul = "日常巡检单-生产任务", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
EiBlock block = inInfo.getBlock(EiConstant.queryBlock);
String creatTime = block.getCellStr(ACConstants.ROW_CODE_0, HGSC007.FIELD_created_time);
if (!creatTime.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGSC007.FIELD_created_time, StringUtil.removeHorizontalLine(creatTime));
}
inInfo = super.query(inInfo,HGSC007.QUERY,new HGSC007() );
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -8,12 +8,10 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC006A;
import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.hg.sc.domain.HGSC008;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.zl.domain.HGZL001;
import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.hg.zl.domain.HGZL004A;
import com.baosight.hggp.hg.zl.domain.*;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
......@@ -136,6 +134,33 @@ public class HGZLTools {
}
}
public static class THGZL003 {
public static HGZL003 add(HGZL003 hgzl003) {
HGSC007 hgsc007 = HGSCTools.THGSC007.getById(hgzl003.getTaskId());
BeanUtils.copyProperties(hgsc007, hgzl003);
cleanBaseInfo(hgzl003);
hgzl003.setCheckStatus(CheckStatusEnum.CHECKED.getCode());
hgzl003.setTaskId(hgsc007.getId());
hgzl003.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL003_CHECK_CODE));
DaoUtils.insert(HGZL003.INSERT, hgzl003);
THGZL004.addByHGZL003(hgzl003);
return hgzl003;
}
private static void cleanBaseInfo(HGZL003 hgzl003) {
hgzl003.setCreatedBy(null);
hgzl003.setCreatedName(null);
hgzl003.setCreatedTime(null);
hgzl003.setUpdatedBy(null);
hgzl003.setUpdatedName(null);
hgzl003.setUpdatedTime(null);
hgzl003.setDepCode(null);
hgzl003.setDepName(null);
hgzl003.setId(null);
}
}
public static class THGZL004 {
/**
......@@ -176,11 +201,25 @@ public class HGZLTools {
// }
}
public static void addByHGZL003(HGZL003 hgzl003) {
List<HGZL004> hgzl004DbList = listByCheckId(hgzl003.getId(), CheckTypeEnum.POLLING_CHECK.getCode());
if (hgzl003.getUnpassQuantity() > 0 && CollectionUtils.isEmpty(hgzl004DbList)) {
HGZL004 hgzl004 = new HGZL004();
BeanUtils.copyProperties(hgzl003, hgzl004);
cleanBaseInfo(hgzl004);
hgzl004.setCheckId(hgzl003.getId());
hgzl004.setCheckType(CheckTypeEnum.PROCESS_CHECK.getCode());
hgzl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode());
hgzl004.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL002_CHECK_CODE));
DaoUtils.insert(HGZL004.INSERT, hgzl004);
}
}
public static void deleteByCheckIds(List<Long> checkIds,CheckTypeEnum checkType){
List<HGZL004> hgzl004List = listByCheckIds(checkIds,checkType.getCode());
List<Long> ids = hgzl004List.stream().map(HGZL004::getId).collect(Collectors.toList());
DaoUtils.update(HGZL004.DELETE_BY_IDS,new HashMap<String,Object>(){{put("ids",ids);}});
// THGZL004A.deleteByInformIds(ids);
THGZL004A.deleteByInformIds(ids);
ids.forEach( id -> {
HGSCTools.THGSC099.deleteByMatId(id,HGConstant.FileBizType.CHECK_DEFECT);
HGSCTools.THGSC099.deleteByMatId(id,HGConstant.FileBizType.CHECK_HANDLE);
......@@ -226,6 +265,7 @@ public class HGZLTools {
}
public static class THGZL004A {
public static void deleteByInformIds(List<Long> informIds){
AssertUtils.isEmpty(informIds, "通知单ID不能为空");
......
......@@ -16,12 +16,8 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author xuao
......@@ -105,6 +101,7 @@ public class CommonMethod {
row.put(HGConstants.PARAM7_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam7())));
row.put(HGConstants.PARAM8_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam8())));
row.put(HGConstants.PARAM9_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam9())));
row.put(HGConstants.PARAM10_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam10())));
} else {
row.put(HGConstants.TEXT_FIELD, String.valueOf(tryValue.get(tableParam.getText())));
row.put(HGConstants.PARAM1_FIELD, String.valueOf(tryValue.get(tableParam.getParam1())));
......@@ -116,6 +113,7 @@ public class CommonMethod {
row.put(HGConstants.PARAM7_FIELD, String.valueOf(tryValue.get(tableParam.getParam7())));
row.put(HGConstants.PARAM8_FIELD, String.valueOf(tryValue.get(tableParam.getParam8())));
row.put(HGConstants.PARAM9_FIELD, String.valueOf(tryValue.get(tableParam.getParam9())));
row.put(HGConstants.PARAM10_FIELD, String.valueOf(tryValue.get(tableParam.getParam10())));
}
resultRows.add(row);
}
......@@ -282,7 +280,7 @@ public class CommonMethod {
comboBoxDefaultValue(inInfo,blockId,valueFieldName,textFieldName,defaultText);
}
public static void comboBoxDefaultValue(EiInfo inInfo, String blockId, String valueFieldName, String textFieldName, String defaultText) {
public static void comboBoxDefaultValue(EiInfo inInfo, String blockId, String valueFieldName, String textFieldName, String defaultText) {
List rows = inInfo.getBlock(blockId).getRows();
List newRows = new ArrayList(){{
add(new HashMap<String,Object>(){{
......@@ -293,4 +291,32 @@ public class CommonMethod {
newRows.addAll(rows);
inInfo.getBlock(blockId).setRows(newRows);
}
public static <T extends DaoEPBase> void objConvertComboBox(List<T> list,EiInfo inInfo, String blockId, String valueFieldName, String textFieldName) {
List rows = (List) Optional.ofNullable(list).orElse(new ArrayList()).stream().map(o -> {
Map map = ((DaoEPBase)o).toMap();
return new HashMap<String,Object>(){{
put(HGConstants.VALUE_FIELD,map.get(valueFieldName));
put(HGConstants.TEXT_FIELD,map.get(textFieldName));
}};
}).collect(Collectors.toList());
EiBlock eiBlock = new EiBlock(blockId);
eiBlock.addBlockMeta(initCodeMeta(HGConstants.TEXT_FIELD, HGConstants.VALUE_FIELD));
eiBlock.setRows(rows);
inInfo.setBlock(eiBlock);
}
public static <T extends DaoEPBase> void joiniObjConvertComboBox(List<T> list,EiInfo inInfo, String blockId, String valueFieldName, String textFieldName) {
List rows = (List) Optional.ofNullable(list).orElse(new ArrayList()).stream().map(o -> {
Map map = ((DaoEPBase)o).toMap();
return new HashMap<String,Object>(){{
put(HGConstants.VALUE_FIELD,map.get(valueFieldName));
put(HGConstants.TEXT_FIELD,String.format("[%s]%s",map.get(valueFieldName),map.get(textFieldName)));
}};
}).collect(Collectors.toList());
EiBlock eiBlock = new EiBlock(blockId);
eiBlock.addBlockMeta(initCodeMeta(HGConstants.TEXT_FIELD, HGConstants.VALUE_FIELD));
eiBlock.setRows(rows);
inInfo.setBlock(eiBlock);
}
}
......@@ -53,6 +53,7 @@
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW007.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW008.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW009.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW010A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW014.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW015.xml"/>
......
......@@ -71,8 +71,8 @@ function saveFunc() {
let companyCode= item.get("companyCode");
let accountYear= item.get("accountYear");
let accountPeriod= item.get("accountPeriod");
let accountPeriodDateStart= item.get("accountPeriodStatus");
let accountPeriodDateEnd= item.get("accountPeriodStatus");
let accountPeriodDateStart= item.get("accountPeriodDateStart");
let accountPeriodDateEnd= item.get("accountPeriodDateEnd");
if(isBlank(companyCode)){
message("选中的第"+(index+1)+"行\"公司名称\",不能为空!");
......@@ -99,6 +99,13 @@ function saveFunc() {
flag = false;
return false;
}
if(accountPeriodDateStart > accountPeriodDateEnd){
message("选中的第"+(index+1)+"行\"账期开始日期\"不能大于\"账期结束日期\"!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
......@@ -20,26 +20,15 @@ $(function() {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
// 计算总金额
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var totalPriceExcluding = item.provisionalQuantity * item.unitPriceExcludingTax;
var totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
detail1Grid.setCellValue(item, 'totalPriceExcluding', totalPriceExcluding);
detail1Grid.setCellValue(item, 'totalPriceIncluding', totalPriceIncluding);
console.log(grid.dataSource._data);
console.log(detail1Grid.getDataItems());
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
allRows.forEach(function (row, index) {
totalPriceExcluding += parseFloat(row.totalPriceExcluding);
totalPriceIncluding += parseFloat(row.totalPriceIncluding);
});
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(totalPriceExcluding.toFixed(3))
$("#result-0-totalContractPriceIncluding").val(totalPriceIncluding.toFixed(3))
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
calculateAmount(item);
}
});
grid.dataSource.bind("change", function(e) {
if (e.field == "provisionalQuantity") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
calculateAmount(item);
}
});
},
......@@ -119,7 +108,43 @@ $(function() {
$("#result-0-mainContractNumber").val("");
}
}
},
"result-0-taxPoints": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var allRows = detail1Grid.getDataItems();
if (allRows.length > 0) {
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
if (valueField) {
var taxPoints = valueField / 100;
var totalContractPriceIncluding = 0;
var valueAddedTax = 0;
//更新表格含税金额
for (var i = 0; i < allRows.length; i++) {
var row = allRows[i];
var totalPriceIncluding = row.totalPriceExcluding * (1 + parseFloat(taxPoints));
detail1Grid.setCellValue(row, 'totalPriceIncluding', totalPriceIncluding);
totalContractPriceIncluding += totalPriceIncluding;
}
$("#result-0-totalContractPriceIncluding").val(totalContractPriceIncluding.toFixed(3))
var totalPriceExcluding = $("#result-0-totalContractPriceExcluding").val();
valueAddedTax = parseFloat(totalContractPriceIncluding.toFixed(3)) - parseFloat(totalPriceExcluding);
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
} else {
var totalContractPriceExcluding = 0;
var valueAddedTax = 0;
for (var i = 0; i < allRows.length; i++) {
var row = allRows[i];
detail1Grid.setCellValue(row, 'totalPriceIncluding', row.totalPriceExcluding);
totalContractPriceExcluding += parseFloat(row.totalPriceExcluding);
}
$("#result-0-totalContractPriceIncluding").val(totalContractPriceExcluding.toFixed(3))
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
}
}
}
},
}
IPLATUI.EFPopupInput = {
......@@ -370,6 +395,65 @@ function fieldValidation() {
return;
}
}
var projCode = $("#result-0-projCode").val();
if (isBlank(projCode)) {
message("请选择项目!");
return;
}
var contractName = $("#result-0-contractName").val();
if (isBlank(contractName)) {
message("请填写合同名称!");
return;
}
var partyA = $("#result-0-partyA").val();
if (isBlank(partyA)) {
message("请选择甲方!");
return;
}
var planStartDate = $("#result-0-planStartDate").val();
if (isBlank(planStartDate)) {
message("请选择计划开工日期!");
return;
}
var planEndDate = $("#result-0-planEndDate").val();
if (isBlank(planEndDate)) {
message("请选择计划竣工日期!");
return;
}
var engineeringAddress = $("#result-0-engineeringAddress").val();
if (isBlank(engineeringAddress)) {
message("请填写工程地址!");
return;
}
var contractContent = $("#result-0-engineeringAddress").val();
if (isBlank(contractContent)) {
message("请填写合同内容!");
return;
}
}
function calculateAmount(item) {
// 计算总金额
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var provisionalQuantity = item.provisionalQuantity || 0;
var unitPriceExcludingTax = item.unitPriceExcludingTax || 0;
var totalPriceExcluding = provisionalQuantity * unitPriceExcludingTax;
var totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
detail1Grid.setCellValue(item, 'totalPriceExcluding', totalPriceExcluding);
detail1Grid.setCellValue(item, 'totalPriceIncluding', totalPriceIncluding);
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
allRows.forEach(function (row, index) {
totalPriceExcluding += parseFloat(row.totalPriceExcluding);
totalPriceIncluding += parseFloat(row.totalPriceIncluding);
});
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(totalPriceExcluding.toFixed(3))
$("#result-0-totalContractPriceIncluding").val(totalPriceIncluding.toFixed(3))
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
}
$(window).load(function () {
refreshRowNo();
......
......@@ -119,7 +119,43 @@ $(function() {
$("#result-0-partyA").val("");
$("#result-0-partyB").val("");
}
}
},
"result-0-taxPoints": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var allRows = detail1Grid.getDataItems();
if (allRows.length > 0) {
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
if (valueField) {
var taxPoints = valueField / 100;
var totalContractPriceIncluding = 0;
var valueAddedTax = 0;
//更新表格含税金额
for (var i = 0; i < allRows.length; i++) {
var row = allRows[i];
var totalPriceIncluding = row.totalPriceExcluding * (1 + parseFloat(taxPoints));
detail1Grid.setCellValue(row, 'totalPriceIncluding', totalPriceIncluding);
totalContractPriceIncluding += totalPriceIncluding;
}
$("#result-0-totalContractPriceIncluding").val(totalContractPriceIncluding.toFixed(3))
var totalPriceExcluding = $("#result-0-totalContractPriceExcluding").val();
valueAddedTax = parseFloat(totalContractPriceIncluding.toFixed(3)) - parseFloat(totalPriceExcluding);
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
} else {
var totalContractPriceExcluding = 0;
var valueAddedTax = 0;
for (var i = 0; i < allRows.length; i++) {
var row = allRows[i];
detail1Grid.setCellValue(row, 'totalPriceIncluding', row.totalPriceExcluding);
totalContractPriceExcluding += parseFloat(row.totalPriceExcluding);
}
$("#result-0-totalContractPriceIncluding").val(totalContractPriceExcluding.toFixed(3))
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
}
}
}
},
}
IPLATUI.EFPopupInput = {
......@@ -496,5 +532,40 @@ function fieldValidation() {
return;
}
}
var projCode = $("#result-0-projCode").val();
if (!projCode) {
message("请选择项目!");
return;
}
var contractName = $("#result-0-contractName").val();
if (!contractName) {
message("请填写合同名称!");
return;
}
var partyA = $("#result-0-partyA").val();
if (!partyA) {
message("请选择甲方!");
return;
}
var planStartDate = $("#result-0-planStartDate").val();
if (!planStartDate) {
message("请选择计划开工日期!");
return;
}
var planEndDate = $("#result-0-planEndDate").val();
if (!planEndDate) {
message("请选择计划竣工日期!");
return;
}
var engineeringAddress = $("#result-0-engineeringAddress").val();
if (!engineeringAddress) {
message("请填写工程地址!");
return;
}
var contractContent = $("#result-0-engineeringAddress").val();
if (!contractContent) {
message("请填写合同内容!");
return;
}
}
......@@ -16,36 +16,12 @@ $(function() {
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "dayNumber") {
if (e.field == "dayNumber" || e.field == "unitPrice" || e.field == "dayNumber") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
// 计算总金额
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var deviceNumber = parseFloat(item.deviceNumber) || 0;
var unitPrice = parseFloat(item.unitPrice) || 0;
var dayNumber = parseFloat(item.dayNumber) || 0;
var totalPrice = deviceNumber * unitPrice * dayNumber;
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
console.log(grid.dataSource._data);
console.log(detail1Grid.getDataItems());
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
totalPrice = 0;
deviceNumber = 0
allRows.forEach(function (row, index) {
totalPrice += parseFloat(row.totalPrice);
deviceNumber += parseFloat(row.deviceNumber);
});
totalPriceExcluding = totalPrice;
totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(parseFloat(totalPriceExcluding).toFixed(3))
$("#result-0-totalContractPriceIncluding").val(parseFloat(totalPriceIncluding).toFixed(3))
$("#result-0-valueAddedTax").val(parseFloat(valueAddedTax).toFixed(3))
$("#result-0-totalQuantity").val(parseFloat(deviceNumber).toFixed(3))
calculateAmount(item);
}
});
......@@ -98,7 +74,25 @@ $(function() {
$("#result-0-projName").val(textField);
}
}
}
},
"result-0-taxPoints": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
if (valueField) {
var taxPoints = valueField / 100;
var totalContractPriceExcluding = $("#result-0-totalContractPriceExcluding").val();
var totalContractPriceIncluding = totalContractPriceExcluding * (1 + taxPoints);
$("#result-0-totalContractPriceIncluding").val(totalContractPriceIncluding.toFixed(3))
$("#result-0-valueAddedTax").val((totalContractPriceIncluding - totalContractPriceExcluding).toFixed(3))
} else {
var totalContractPriceExcluding = parseFloat($("#result-0-totalContractPriceExcluding").val());
$("#result-0-totalContractPriceIncluding").val(totalContractPriceExcluding.toFixed(3))
$("#result-0-valueAddedTax").val(0)
}
}
},
}
IPLATUI.EFPopupInput = {
......@@ -245,10 +239,60 @@ let refreshRowNo = function () {
}
}
function fieldValidation() {
var projCode = $("#result-0-projCode").val();
if (isBlank(projCode)) {
message("请选择项目!");
return;
}
var contractName = $("#result-0-contractName").val();
if (isBlank(contractName)) {
message("请填写合同名称!");
return;
}
var partyA = $("#result-0-partyA").val();
if (isBlank(partyA)) {
message("请选择甲方!");
return;
}
var planStartDate = $("#result-0-leaseStartDate").val();
if (isBlank(planStartDate)) {
message("请选择租赁开始日期!");
return;
}
var planEndDate = $("#result-0-leaseEndDate").val();
if (isBlank(planEndDate)) {
message("请选择租赁结束日期!");
return;
}
}
$(window).load(function () {
refreshRowNo();
});
function calculateAmount(item) {
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var deviceNumber = parseFloat(item.deviceNumber) || 0;
var unitPrice = parseFloat(item.unitPrice) || 0;
var dayNumber = parseFloat(item.dayNumber) || 0;
var totalPrice = deviceNumber * unitPrice * dayNumber;
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
totalPrice = 0;
deviceNumber = 0
allRows.forEach(function (row, index) {
totalPrice += parseFloat(row.totalPrice);
deviceNumber += parseFloat(row.deviceNumber);
});
totalPriceExcluding = totalPrice;
totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(parseFloat(totalPriceExcluding).toFixed(3))
$("#result-0-totalContractPriceIncluding").val(parseFloat(totalPriceIncluding).toFixed(3))
$("#result-0-valueAddedTax").val(parseFloat(valueAddedTax).toFixed(3))
$("#result-0-totalQuantity").val(parseFloat(deviceNumber).toFixed(3))
}
......@@ -29,10 +29,11 @@ $(function() {
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
var cumulativeEngineeringQuantity = queryCumulativeEngineeringQuantity(inventoryId);
detail1Grid.setCellValue(item, 'cumulativeEngineeringQuantity', thisEngineeringQuantity + cumulativeEngineeringQuantity);
// 计算总金额
calculateAmount(detail1Grid.getDataItems());
queryCumulativeEngineeringQuantity(inventoryId,item);
// 计算总金额
setTimeout(function () {
calculateAmount(detail1Grid.getDataItems());
}, 200);
}
});
grid.dataSource.bind("change", function(e) {
......@@ -100,6 +101,14 @@ $(function() {
$("#result-0-projName").val(textField);
}
}
},
"result-0-taxPoints": {
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var taxPoints = valueField ? valueField / 100 : 0;
calculateAmount2(taxPoints);
}
}
}
......@@ -276,27 +285,27 @@ let refreshRowNo = function () {
detail1Grid.refresh();
}
}
function queryCumulativeEngineeringQuantity(inventoryId) {
function queryCumulativeEngineeringQuantity(inventoryId,item) {
if (inventoryId) {
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var info = new EiInfo();
info.set("inventoryId", inventoryId);
EiCommunicator.send("HGCW009", "queryEngineeringQuantity", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
return ei.result
var cumulativeEngineeringQuantity = ei.extAttr.result || 0;
detail1Grid.setCellValue(item, 'cumulativeEngineeringQuantity', thisEngineeringQuantity + cumulativeEngineeringQuantity);
} else {
NotificationUtil(ei, "error");
return 0;
detail1Grid.setCellValue(item, 'cumulativeEngineeringQuantity', thisEngineeringQuantity);
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
return 0;
}
});
}
return 0;
}
/**
......@@ -348,9 +357,48 @@ function calculateAmount(rows) {
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3))
}
function fieldValidation() {
function calculateAmount2(taxPoints) {
var rows = detail1Grid.getDataItems();
var contractType = $("#contractType").val();
var totalPrice = 0;
var deductionPrice= 0;
rows.forEach(function (row, index) {
if (row.settlementBasis == "合同内") {
totalPrice += parseFloat(row.totalPrice);
} else {
deductionPrice += parseFloat(row.totalPrice);
}
});
//本次结算金额
var thisSettlementAmount = $("#result-0-thisSettlementAmount").val() || 0;
//本次结算税金
var thisSettlementTax = 0;
if (contractType == "1") {
thisSettlementTax = thisSettlementAmount * taxPoints;
} else {
thisSettlementTax = totalPrice * taxPoints;
}
//本次价税合计=本次结算金额+本次结算税金
var thisPriceTax = parseFloat(thisSettlementAmount) + parseFloat(thisSettlementTax);
$("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(3))
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3))
//累计结算金额
var cumulativeSettlementAmount = parseFloat(sumCumulativeSettlementAmount) + parseFloat(thisSettlementAmount);
//累计结算税金
var cumulativeSettlementTax = parseFloat(sumCumulativeSettlementTax) + parseFloat(thisSettlementTax);
//累计价税合计=累计结算金额+累计结算税金
var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax);
$("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(3))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3))
}
function fieldValidation() {
var projCode = $("#result-0-projCode").val();
if (isBlank(projCode)) {
message("请选择项目!");
return;
}
}
$(window).load(function () {
refreshRowNo();
});
......
......@@ -29,10 +29,11 @@ $(function() {
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
var cumulativeEngineeringQuantity = queryCumulativeEngineeringQuantity(inventoryId);
detail1Grid.setCellValue(item, 'cumulativeEngineeringQuantity', thisEngineeringQuantity + cumulativeEngineeringQuantity);
queryCumulativeEngineeringQuantity(inventoryId,item);
// 计算总金额
calculateAmount(detail1Grid.getDataItems());
setTimeout(function () {
calculateAmount(detail1Grid.getDataItems());
}, 200);
}
});
grid.dataSource.bind("change", function(e) {
......@@ -109,6 +110,14 @@ $(function() {
$("#result-0-projName").val(textField);
}
}
},
"result-0-taxPoints": {
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var taxPoints = valueField ? valueField / 100 : 0;
calculateAmount2(taxPoints);
}
}
}
......@@ -266,27 +275,27 @@ function btnSaveFunc() {
});
}
function queryCumulativeEngineeringQuantity(inventoryId) {
function queryCumulativeEngineeringQuantity(inventoryId,item) {
if (inventoryId) {
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var info = new EiInfo();
info.set("inventoryId", inventoryId);
EiCommunicator.send("HGCW009", "queryEngineeringQuantity", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
return ei.result
var cumulativeEngineeringQuantity = ei.extAttr.result || 0;
detail1Grid.setCellValue(item, 'cumulativeEngineeringQuantity', thisEngineeringQuantity + cumulativeEngineeringQuantity);
} else {
NotificationUtil(ei, "error");
return 0;
detail1Grid.setCellValue(item, 'cumulativeEngineeringQuantity', thisEngineeringQuantity);
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
return 0;
}
});
}
return 0;
}
/**
......@@ -338,6 +347,41 @@ function calculateAmount(rows) {
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3))
}
function calculateAmount2(taxPoints) {
var rows = detail1Grid.getDataItems();
var contractType = $("#contractType").val();
var totalPrice = 0;
var deductionPrice= 0;
rows.forEach(function (row, index) {
if (row.settlementBasis == "合同内") {
totalPrice += parseFloat(row.totalPrice);
} else {
deductionPrice += parseFloat(row.totalPrice);
}
});
//本次结算金额
var thisSettlementAmount = $("#result-0-thisSettlementAmount").val() || 0;
//本次结算税金
var thisSettlementTax = 0;
if (contractType == "1") {
thisSettlementTax = thisSettlementAmount * taxPoints;
} else {
thisSettlementTax = totalPrice * taxPoints;
}
//本次价税合计=本次结算金额+本次结算税金
var thisPriceTax = parseFloat(thisSettlementAmount) + parseFloat(thisSettlementTax);
$("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(3))
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3))
//累计结算金额
var cumulativeSettlementAmount = parseFloat(sumCumulativeSettlementAmount) + parseFloat(thisSettlementAmount);
//累计结算税金
var cumulativeSettlementTax = parseFloat(sumCumulativeSettlementTax) + parseFloat(thisSettlementTax);
//累计价税合计=累计结算金额+累计结算税金
var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax);
$("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(3))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3))
}
function initDate() {
var projCode = $("#result-0-projCode").val();
var contractNumber = $("#result-0-contractNumber").val();
......@@ -444,7 +488,11 @@ function deleteResult1Func() {
});
}
function fieldValidation() {
var projCode = $("#result-0-projCode").val();
if (isBlank(projCode)) {
message("请选择项目!");
return;
}
}
......
......@@ -16,17 +16,18 @@ $(function() {
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">明细详情</a>';
+ 'onclick="contractDetailFunc(' + item.id + ')">开票清单</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
],
loadComplete: function (e) {
loadComplete: function (grid) {
$("#SELECT_BILL").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc);
$("#SUBMIT").on("click",submitFunc);
$("#BTN_BILL").on("click",billFunc);
},
onSuccess: function (e) {
......@@ -81,9 +82,13 @@ function updateFunc() {
message("请选择一条数据");
return;
}
if (rows[0].reviewStatus == "3") {
message("已经审核的单据不能修改");
return;
}
JSColorbox.open({
href: "HGCW010B?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>修改合同</div>",
href: "HGCW010B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>开票清单</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
......@@ -100,8 +105,8 @@ function windowCallback() {
function contractDetailFunc(id) {
JSColorbox.open({
href: "HGCW011?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW011",
title: "<div style='text-align: center;'>明细详情</div>",
href: "HGCW010C?methodName=initLoad&inqu_status-0-mainId=" + id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>开票清单</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
......@@ -126,13 +131,14 @@ function submitFunc() {
var flag = true;
rows.forEach(function (row) {
if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的合同!");
message("勾选的数据中有已经审核的票据!");
flag = false;
}
})
}
)
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"审核\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
......@@ -156,7 +162,8 @@ function submitFunc() {
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
},
});
}
});
......@@ -164,4 +171,51 @@ function submitFunc() {
}
}
function billFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
if (row.billState == "2") {
message("勾选的数据中有已经开票的票据!");
flag = false;
}
}
)
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"开票\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW010", "billing", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
},
});
}
});
}
}
......@@ -59,17 +59,17 @@ function btnSaveFunc() {
return;
}
if (parseFloat(thisAmount) > parseFloat(remainingAmount)) {
message("第" + (i + 1) + "行本次开票金额不能大于剩余开票金额");
message("第" + (i + 1) + "行本次开票金额不能大于剩余结算金额");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成销售票据吗? ", {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成销售开票单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW010", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
// parent.JSColorbox.setValueCallback();
parent.JSColorbox.setValueCallback();
}
}
);
......@@ -77,3 +77,4 @@ function btnSaveFunc() {
});
}
......@@ -26,7 +26,8 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="结算编号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractDate" cname="结算日期" width="120" enable="false" readonly="true" align="center"/>
......@@ -35,6 +36,7 @@
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/>
<EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisAmount" cname="本次结算金额" width="120" align="center"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/>
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW010", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW010", "delete", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="金额修改">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:N3}" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW010", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW010", "delete", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="销售开票清单">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:N3}" align="center" enable="false" readonly="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
......@@ -64,7 +64,7 @@ let query = function () {
*/
function addFunc() {
JSColorbox.open({
href: "HGCW012A?methodName=initLoad&efParentFormEname=HGCW010",
href: "HGCW012A?methodName=initLoad&efParentFormEname=HGCW012",
title: "<div style='text-align: center;'>结算单</div>",
width: "90%",
height: "90%",
......@@ -100,7 +100,7 @@ function windowCallback() {
function contractDetailFunc(id) {
JSColorbox.open({
href: "HGCW012?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW012",
href: "HGCW012A?methodName=initLoad&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>明细详情</div>",
width: "90%",
height: "90%",
......
......@@ -10,14 +10,14 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDateSpan startCname="票日期(从)" endCname="至" blockId="inqu_status"
<EF:EFDateSpan startCname="票日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="票据类型" ename="billTybe" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="开票状态" ename="inqu_status-0-billState" colWidth="3" filter="contains">
<EF:EFSelect cname="审核状态" ename="inqu_status-0-billState" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFSelect>
......@@ -28,21 +28,16 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="供应商名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billTybe" cname="票据类型" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="receiveDate" cname="收票日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="taxPoints" cname="税率" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billState" cname="开票状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.billState"/>
</EF:EFComboColumn>
<EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......
......@@ -77,3 +77,235 @@ function btnSaveFunc() {
});
}
$(function () {
$("#SEARCH").click(function () {
var ei = new EiInfo();
ei.setByNode("inqu");
EiCommunicator.send("HGCW012", "query", ei, {
onSuccess: function (ei) {
resultGrid.setEiInfo(ei);
resultAGrid.setEiInfo(ei);
}, onFail: function () {
}
});
});
IPLATUI.EFGrid = {
"result": {
columns: [
{
field: "projCode",
title: "项目编号",
headerTemplate: "<span style='color: '>项目编号 </span>",
width: 200,
locked: true
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "settlementNumber",
title: "结算编号",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "contractDate",
title: "结算日期",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "billNumber",
title: "发票号",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "taxPoints",
title: "税率(%)",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisPriceTax",
title: "结算价税合计金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisSettlementTax",
title: "结算税金",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisSettlementAmount",
title: "结算金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},{
field: "remainingAmount",
title: "剩余收票金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
}],
dataBound: function (e) {
}
},
"resultA": {
columns: [
{
field: "projCode",
title: "项目编号",
headerTemplate: "<span style='color: '>项目编号 </span>",
width: 200,
locked: true
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "settlementNumber",
title: "结算编号",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "contractDate",
title: "结算日期",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "billNumber",
title: "发票号",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "taxPoints",
title: "税率(%)",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisPriceTax",
title: "结算价税合计金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisSettlementTax",
title: "结算税金",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisSettlementAmount",
title: "结算金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},{
field: "remainingAmount",
title: "剩余收票金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
}],
dataBound: function (e) {
}
}, "resultB": {
columns: [
{
field: "projCode",
title: "项目编号",
headerTemplate: "<span style='color: '>项目编号 </span>",
width: 200,
locked: true
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "settlementNumber",
title: "结算编号",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "contractDate",
title: "结算日期",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "billNumber",
title: "发票号",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "taxPoints",
title: "税率(%)",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisPriceTax",
title: "结算价税合计金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisSettlementTax",
title: "结算税金",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},
{
field: "thisSettlementAmount",
title: "结算金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
},{
field: "remainingAmount",
title: "剩余收票金额",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false
}],
}
};
IPLATUI.EFTab = {
"info": {
show: function (e) {
$(e.contentElement).find("div[datarole='grid']").data("kendoGrid").refresh()
}
}
}
});
......@@ -6,47 +6,37 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="结算单选择">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFDateSpan startCname="结算日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="项目编号" ename="projCode" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="结算编号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="结算编号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractDate" cname="结算日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="true" align="center" required="true"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/>
<EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<EF:EFPage title="结算单">
<EF:EFRegion id="inqu">
<div class="row">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden">
</EF:EFInput>
<EF:EFDateSpan startCname="结算日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="项目编号" ename="projCode" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="结算编号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFTab id="info">
<div title="采购收货">
<EF:EFGrid blockId="result" autoBind="false">
</EF:EFGrid>
</div>
<div title="劳务">
<EF:EFGrid blockId="resultA" autoBind="false">
</EF:EFGrid>
</div>
<div title="租赁">
<EF:EFGrid blockId="resultB" autoBind="false">
</EF:EFGrid>
</div>
</EF:EFTab>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
</script>
\ No newline at end of file
......@@ -20,7 +20,7 @@ $(function () {
// 详情
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="jump(' + item.id + ',\''+item.submitStatus+'\')" >详情</a>';
+ 'onclick="jump(' + item.id + ',\''+item.submitStatus+'\',\''+item.whCode+'\',\''+item.companyCode+'\',\''+item.source+'\')" >详情</a>';
}
return template;
}
......@@ -134,8 +134,12 @@ function check(id, auditStatus) {
inEiInfo.set("result-0-submitStatus", auditStatus);
EiCommunicator.send('HGKC006', 'check', inEiInfo, {
onSuccess(response) {
message("提交成功");
resultGrid.dataSource.page(1);
if (response.status == "-1") {
NotificationUtil({msg: response.msg, detailMsg: response.detailMsg}, "error");
} else {
NotificationUtil(response.msg);
query();
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
......@@ -147,9 +151,17 @@ function check(id, auditStatus) {
);
}
//详情
function jump(id,submitStatus) {
var herf = ctx + "\\web\\" + "HGKC006A?inqu_status-0-primaryId=" + id + "&inqu_status-0-submitStatus="+ submitStatus +"&efParentFormEname=HGKC006";
window.open(herf);
function jump(id,submitStatus,whCode,companyCode,source) {
JSColorbox.open({
href: "HGKC006A?methodName=initLoad&inqu_status-0-primaryId=" + id
+"&inqu_status-0-whCode="+whCode
+"&inqu_status-0-companyCode="+companyCode
+"&inqu_status-0-submitStatus="+submitStatus
+"&inqu_status-0-source="+source,
title: "<div style='text-align: center;'>其他入库详情</div>",
width: "80%",
height: "80%",
});
}
/**
* 选择生产任务
......
......@@ -54,6 +54,9 @@
<EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn cname="数据来源" ename="source" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hggp.hpkc.source"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -7,6 +7,11 @@
<EF:EFPage title="其他入库单明细">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="inqu_status-0-primaryId" cname="领料单id" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-whCode" cname="仓库编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyCode" cname="仓库编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-submitStatus" cname="状态" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-source" cname="来源" colWidth="3" type="hidden"/>
<div class="row">
<%-- <EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" filter="contains"
defultValue="">
......@@ -30,6 +35,9 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="primaryId" cname="主表id" hidden="true"/>
<EF:EFColumn ename="whCode" cname="仓库编码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编号" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
......@@ -37,14 +45,18 @@
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="partSpec" cname="规格" width="120" align="center" required="true" enable="true"/>
<EF:EFColumn ename="partSpecId" cname="规格id" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="存货档案id" width="120" align="center" required="true" enable="false" hidden="true"/>
<EF:EFColumn ename="partLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="coefficient" cname="系数" width="80" align="right" format="{0:N2}" maxLength="10" enable="false" hidden="true"/>
<EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
required="true"/>
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
......@@ -55,7 +67,8 @@
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
required="true"/>
<EF:EFColumn ename="amount" cname="金额" width="120" align="right" enable="false" format="{0:N3}"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -20,7 +20,7 @@ $(function () {
// 详情
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="jump(' + item.id + ',\''+item.submitStatus+'\')" >详情</a>';
+ 'onclick="jump(' + item.id + ',\''+item.submitStatus+'\',\''+item.whCode+'\',\''+item.companyCode+'\',\''+item.source+'\')" >详情</a>';
}
return template;
}
......@@ -148,9 +148,17 @@ function check(id, auditStatus) {
}
//详情
function jump(id,submitStatus) {
var herf = ctx + "\\web\\" + "HGKC007A?inqu_status-0-primaryId=" + id + "&inqu_status-0-submitStatus="+ submitStatus +"&efParentFormEname=HGKC007";
window.open(herf);
function jump(id,submitStatus,whCode,companyCode,source) {
JSColorbox.open({
href: "HGKC007A?methodName=initLoad&inqu_status-0-primaryId=" + id
+"&inqu_status-0-whCode="+whCode
+"&inqu_status-0-companyCode="+companyCode
+"&inqu_status-0-submitStatus="+submitStatus
+"&inqu_status-0-source="+source,
title: "<div style='text-align: center;'>其他出库详情</div>",
width: "80%",
height: "80%",
});
}
/**
......
......@@ -55,7 +55,9 @@
<EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" enable="false" >
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn cname="数据来源" ename="source" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hggp.hpkc.source"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
......
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