Commit 76369964 by 江和松

生产入库工具类提交

parent af599cb1
......@@ -65,6 +65,12 @@ public class HGKC003 extends DaoEPBase {
public static final String FIELD_PART_THICK = "partThick"; /* 零件-厚*/
public static final String FIELD_PART_SPEC = "partSpec"; /* 零件规格*/
public static final String FIELD_SUBMIT_STATUS = "submitStatus"; /* 提交状态 0未提交,1已提交*/
public static final String FIELD_PART_SPEC_ID = "partSpecId"; /* 零件规格ID*/
public static final String FIELD_RECTIFICATION_ID = "rectificationId"; /* 整改通知单ID*/
public static final String FIELD_PART_COEFFICIENT = "partCoefficient"; /* 零件系数*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_STORAGE_TYPE = "storageType"; /* 入库类型:0:入库 1:退回*/
public static final String COL_ID = "ID";
public static final String COL_QUALITY_ID = "QUALITY_ID"; /* 质检单ID*/
......@@ -108,6 +114,12 @@ public class HGKC003 extends DaoEPBase {
public static final String COL_PART_THICK = "PART_THICK"; /* 零件-厚*/
public static final String COL_PART_SPEC = "PART_SPEC"; /* 零件规格*/
public static final String COL_SUBMIT_STATUS = "SUBMIT_STATUS"; /* 提交状态 0未提交,1已提交*/
public static final String COL_PART_SPEC_ID = "PART_SPEC_ID"; /* 零件规格ID*/
public static final String COL_RECTIFICATION_ID = "RECTIFICATION_ID"; /* 整改通知单ID*/
public static final String COL_PART_COEFFICIENT = "PART_COEFFICIENT"; /* 零件系数*/
public static final String COL_PRICE = "PRICE"; /* 单价*/
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
public static final String COL_STORAGE_TYPE = "STORAGE_TYPE"; /* 入库类型:0:入库 1:退回*/
public static final String QUERY = "HGKC003.query";
public static final String COUNT = "HGKC003.count";
......@@ -159,6 +171,12 @@ public class HGKC003 extends DaoEPBase {
private BigDecimal partThick = new BigDecimal(0.000); /* 零件-厚*/
private String partSpec = " "; /* 零件规格*/
private Integer submitStatus; /* 提交状态 0未提交,1已提交*/
private Long partSpecId = new Long(0); /* 规格id*/
private Long rectificationId = new Long(0); /* 整改通知单id*/
private BigDecimal partCoefficient = new BigDecimal(0.000); /* 零件-系数*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private Boolean storageType; /* 入库类型:0:入库 1:退回*/
/**
* initialize the metadata.
......@@ -362,6 +380,39 @@ public class HGKC003 extends DaoEPBase {
eiColumn.setDescName("提交状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_SPEC_ID);
eiColumn.setDescName("零件规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECTIFICATION_ID);
eiColumn.setDescName("整改通知单ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_COEFFICIENT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STORAGE_TYPE);
eiColumn.setDescName("入库类型:0:入库 1:退回");
eiMetadata.addMeta(eiColumn);
}
......@@ -1029,6 +1080,54 @@ public class HGKC003 extends DaoEPBase {
this.qualityId = qualityId;
}
public Long getPartSpecId() {
return partSpecId;
}
public void setPartSpecId(Long partSpecId) {
this.partSpecId = partSpecId;
}
public Long getRectificationId() {
return rectificationId;
}
public void setRectificationId(Long rectificationId) {
this.rectificationId = rectificationId;
}
public BigDecimal getPartCoefficient() {
return partCoefficient;
}
public void setPartCoefficient(BigDecimal partCoefficient) {
this.partCoefficient = partCoefficient;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public Boolean getStorageType() {
return storageType;
}
public void setStorageType(Boolean storageType) {
this.storageType = storageType;
}
/**
* get the value from Map.
*
......@@ -1079,6 +1178,12 @@ public class HGKC003 extends DaoEPBase {
setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_THICK)), partThick));
setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_SPEC)), partSpec));
setSubmitStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SUBMIT_STATUS)), submitStatus));
setPartSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PART_SPEC_ID)), partSpecId));
setRectificationId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_RECTIFICATION_ID)), rectificationId));
setPartCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_COEFFICIENT)), partCoefficient));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setStorageType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_STORAGE_TYPE)), storageType));
}
/**
......@@ -1130,6 +1235,12 @@ public class HGKC003 extends DaoEPBase {
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_SUBMIT_STATUS, StringUtils.toString(submitStatus, eiMetadata.getMeta(FIELD_SUBMIT_STATUS)));
map.put(FIELD_PART_SPEC_ID, StringUtils.toString(partSpecId, eiMetadata.getMeta(FIELD_PART_SPEC_ID)));
map.put(FIELD_RECTIFICATION_ID, StringUtils.toString(rectificationId, eiMetadata.getMeta(FIELD_RECTIFICATION_ID)));
map.put(FIELD_PART_COEFFICIENT, StringUtils.toString(partCoefficient, eiMetadata.getMeta(FIELD_PART_COEFFICIENT)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_STORAGE_TYPE, StringUtils.toString(storageType, eiMetadata.getMeta(FIELD_STORAGE_TYPE)));
return map;
}
......
......@@ -23,7 +23,6 @@ public class HGKC003A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_QUALITY_DETAIL_ID = "qualityDetailId"; /* 质检单明细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"; /* 记录创建者*/
......@@ -67,9 +66,13 @@ public class HGKC003A extends DaoEPBase {
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_STORAGE_TYPE = "storageType"; /* 入库类型:0:入库 1:退回*/
public static final String FIELD_QUALITY_ID = "qualityId"; /* 质检单ID*/
public static final String FIELD_PART_SPEC_ID = "partSpecId"; /* 零件规格ID*/
public static final String FIELD_RECTIFICATION_ID = "rectificationId"; /* 整改通知单ID*/
public static final String FIELD_PART_COEFFICIENT = "partCoefficient"; /* 零件系数*/
public static final String COL_ID = "ID";
public static final String COL_QUALITY_DETAIL_ID = "QUALITY_DETAIL_ID"; /* 质检单明细ID*/
public static final String COL_QUALITY_ID = "QUALITY_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"; /* 记录创建者*/
......@@ -114,6 +117,10 @@ public class HGKC003A extends DaoEPBase {
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
public static final String COL_STORAGE_TYPE = "STORAGE_TYPE"; /* 入库类型:0:入库 1:退回*/
public static final String COL_PART_SPEC_ID = "PART_SPEC_ID"; /* 零件规格ID*/
public static final String COL_RECTIFICATION_ID = "RECTIFICATION_ID"; /* 整改通知单ID*/
public static final String COL_PART_COEFFICIENT = "PART_COEFFICIENT"; /* 零件系数*/
public static final String QUERY = "HGKC003A.query";
public static final String COUNT = "HGKC003A.count";
public static final String INSERT = "HGKC003A.insert";
......@@ -122,7 +129,7 @@ public class HGKC003A extends DaoEPBase {
public static final String BATCH_DELETE = "HGKC003A.batchDelete";
private Long id = new Long(0);
private Long qualityDetailId = new Long(0); /* 质检单明细ID*/
private Long qualityId = new Long(0); /* 质检单ID*/
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
......@@ -167,6 +174,11 @@ public class HGKC003A extends DaoEPBase {
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private Boolean storageType; /* 入库类型:0:入库 1:退回*/
private Long partSpecId = new Long(0); /* 规格id*/
private Long rectificationId = new Long(0); /* 整改通知单id*/
private BigDecimal partCoefficient = new BigDecimal(0.000); /* 零件-系数*/
/**
* initialize the metadata.
*/
......@@ -178,8 +190,8 @@ public class HGKC003A extends DaoEPBase {
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUALITY_DETAIL_ID);
eiColumn.setDescName("质检单明细ID");
eiColumn = new EiColumn(FIELD_QUALITY_ID);
eiColumn.setDescName("质检单ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
......@@ -387,6 +399,21 @@ public class HGKC003A extends DaoEPBase {
eiColumn.setDescName("入库类型:0:入库 1:退回");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_SPEC_ID);
eiColumn.setDescName("零件规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECTIFICATION_ID);
eiColumn.setDescName("整改通知单ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_COEFFICIENT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-系数");
eiMetadata.addMeta(eiColumn);
}
......@@ -1102,12 +1129,36 @@ public class HGKC003A extends DaoEPBase {
this.storageType = storageType;
}
public Long getQualityDetailId() {
return qualityDetailId;
public Long getQualityId() {
return qualityId;
}
public void setQualityId(Long qualityId) {
this.qualityId = qualityId;
}
public Long getPartSpecId() {
return partSpecId;
}
public void setPartSpecId(Long partSpecId) {
this.partSpecId = partSpecId;
}
public Long getRectificationId() {
return rectificationId;
}
public void setRectificationId(Long rectificationId) {
this.rectificationId = rectificationId;
}
public BigDecimal getPartCoefficient() {
return partCoefficient;
}
public void setQualityDetailId(Long qualityDetailId) {
this.qualityDetailId = qualityDetailId;
public void setPartCoefficient(BigDecimal partCoefficient) {
this.partCoefficient = partCoefficient;
}
/**
......@@ -1119,7 +1170,7 @@ public class HGKC003A extends DaoEPBase {
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setQualityDetailId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_QUALITY_DETAIL_ID)), qualityDetailId));
setQualityId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_QUALITY_ID)), qualityId));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
......@@ -1163,6 +1214,9 @@ public class HGKC003A extends DaoEPBase {
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setStorageType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_STORAGE_TYPE)), storageType));
setPartSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PART_SPEC_ID)), partSpecId));
setRectificationId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_RECTIFICATION_ID)), rectificationId));
setPartCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_COEFFICIENT)), partCoefficient));
}
/**
......@@ -1173,7 +1227,7 @@ public class HGKC003A extends DaoEPBase {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_QUALITY_DETAIL_ID, StringUtils.toString(qualityDetailId, eiMetadata.getMeta(FIELD_QUALITY_DETAIL_ID)));
map.put(FIELD_QUALITY_ID, StringUtils.toString(qualityId, eiMetadata.getMeta(FIELD_QUALITY_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
......@@ -1217,6 +1271,9 @@ public class HGKC003A extends DaoEPBase {
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_STORAGE_TYPE, StringUtils.toString(storageType, eiMetadata.getMeta(FIELD_STORAGE_TYPE)));
map.put(FIELD_PART_SPEC_ID, StringUtils.toString(partSpecId, eiMetadata.getMeta(FIELD_PART_SPEC_ID)));
map.put(FIELD_RECTIFICATION_ID, StringUtils.toString(rectificationId, eiMetadata.getMeta(FIELD_RECTIFICATION_ID)));
map.put(FIELD_PART_COEFFICIENT, StringUtils.toString(partCoefficient, eiMetadata.getMeta(FIELD_PART_COEFFICIENT)));
return map;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGKC003">
<sql id="column">
ID as "id",
QUALITY_ID as "qualityId", <!-- 质检单id -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
DEPOSIT_DATE as "depositDate", <!-- 入库日期 -->
DEPOSIT_NO as "depositNo", <!-- 入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INV_QTY as "invQty", <!-- 数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 单重 -->
INV_WEIGHT as "invWeight", <!-- 重量 -->
DEPOSIT_NO_OLD as "depositNoOld", <!-- 入库单号(旧) -->
REMARK as "remark", <!-- 备注 -->
FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
SUBMIT_STATUS as "submitStatus" <!-- 提交状态 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="HGXSDataAuth.authCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<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>
......@@ -74,7 +49,16 @@
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME like ('%$whName$%')
WH_NAME = #whName#
</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="depositNoOld">
DEPOSIT_NO_OLD = #depositNoOld#
......@@ -139,67 +123,116 @@
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="storageType">
STORAGE_TYPE = #storageType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qualityId">
QUALITY_ID = #qualityId#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
<isNotEmpty prepend=" AND " property="partSpecId">
PART_SPEC_ID = #partSpecId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositNos">
DEPOSIT_NO IN <iterate open="(" close=")" conjunction="," property="depositNos">#depositNos[]#</iterate>
<isNotEmpty prepend=" AND " property="rectificationId">
RECTIFICATION_ID = #rectificationId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCoefficient">
PART_COEFFICIENT = #partCoefficient#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
</sql>
<sql id="customCondition">
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</sql>
<sql id="orderBy">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC003">
SELECT
ID as "id",
QUALITY_ID as "qualityId",<!-- 质检单明细ID -->
RECTIFICATION_ID as "rectificationId",<!-- 整改通知单ID -->
PART_SPEC_ID as "partSpecId",<!-- 零件规格ID -->
PART_COEFFICIENT as "partCoefficient",<!-- 零件系数 -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
DEPOSIT_DATE as "depositDate", <!-- 入库日期 -->
DEPOSIT_NO as "depositNo", <!-- 入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INV_QTY as "invQty", <!-- 数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 单重 -->
INV_WEIGHT as "invWeight", <!-- 重量 -->
DEPOSIT_NO_OLD as "depositNoOld", <!-- 入库单号(旧) -->
REMARK as "remark", <!-- 备注 -->
FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
STORAGE_TYPE as "storageType", <!-- 入库类型:0:入库 1:退回 -->
SUBMIT_STATUS as "submitStatus" <!-- 提交状态 -->
FROM ${hggpSchema}.HGKC003 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.kc.domain.HGKC003">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC003 WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC003 WHERE 1=1
<include refid="condition"/>
<include refid="condition" />
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC003 (
QUALITY_ID, <!-- 企业编码 -->
QUALITY_ID,<!-- 质检单ID -->
PART_SPEC_ID,<!-- 零件规格ID -->
RECTIFICATION_ID,<!-- 整改通知单ID -->
PART_COEFFICIENT,<!-- 零件系数 -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
......@@ -231,14 +264,20 @@
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
SUBMIT_STATUS <!-- 提交状态 -->
) VALUES (
#qualityId#,#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#,
#invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#,
#projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#,
#partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #submitStatus#
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
STORAGE_TYPE, <!-- 入库类型:0:入库 1:退回 -->
SUBMIT_STATUS
)
VALUES (#qualityId#,#partSpecId#,#rectificationId#,#partCoefficient#,#accountCode#,
#depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #deleteFlag#, #companyCode#,
#companyName#, #depositDate#, #depositNo#, #whCode#, #whName#,
#invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#,
#factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#,
#prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#,
#prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#,
#partThick#, #partSpec#, #price#, #amount#, #storageType#,#submitStatus#)
</insert>
<delete id="delete">
......@@ -246,10 +285,18 @@
ID = #id#
</delete>
<delete id="batchDelete">
DELETE FROM ${hggpSchema}.HGKC003 WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGKC003
SET
QUALITY_ID = #qualityId#, <!-- 质检单id -->
QUALITY_ID = #qualityId#,<!-- 质检单ID -->
RECTIFICATION_ID = #rectificationId#,<!-- 整改通知单ID -->
PART_SPEC_ID = #partSpecId#,<!-- 零件规格ID -->
PART_COEFFICIENT = #partCoefficient#,<!-- 零件系数 -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
......@@ -289,6 +336,9 @@
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
STORAGE_TYPE = #storageType#, <!-- 入库类型:0:入库 1:退回 -->
SUBMIT_STATUS = #submitStatus# <!-- 提交状态 -->
WHERE
ID = #id#
......
......@@ -135,8 +135,17 @@
<isNotEmpty prepend=" AND " property="storageType">
STORAGE_TYPE = #storageType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qualityDetailId">
QUALITY_DETAIL_ID = #qualityDetailId#
<isNotEmpty prepend=" AND " property="qualityId">
QUALITY_ID = #qualityId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpecId">
PART_SPEC_ID = #partSpecId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="rectificationId">
RECTIFICATION_ID = #rectificationId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCoefficient">
PART_COEFFICIENT = #partCoefficient#
</isNotEmpty>
</sql>
......@@ -144,7 +153,10 @@
resultClass="com.baosight.hggp.hg.kc.domain.HGKC003A">
SELECT
ID as "id",
QUALITY_DETAIL_ID as "qualityDetailId",<!-- 质检单明细ID -->
QUALITY_ID as "qualityId",<!-- 质检单明细ID -->
RECTIFICATION_ID as "rectificationId",<!-- 整改通知单ID -->
PART_SPEC_ID as "partSpecId",<!-- 零件规格ID -->
PART_COEFFICIENT as "partCoefficient",<!-- 零件系数 -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
......@@ -209,7 +221,10 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC003A (
QUALITY_DETAIL_ID,<!-- 企业编码 -->
QUALITY_ID,<!-- 质检单ID -->
RECTIFICATION_ID,<!-- 整改通知单ID -->
PART_SPEC_ID,<!-- 零件规格ID -->
PART_COEFFICIENT,<!-- 零件系数 -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
......@@ -254,7 +269,7 @@
AMOUNT, <!-- 金额 -->
STORAGE_TYPE <!-- 入库类型:0:入库 1:退回 -->
)
VALUES (#qualityDetailId#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#, #invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #primaryId#, #price#, #amount#, #storageType#)
VALUES (#qualityId#,#partSpecId#,#rectificationId#,#partCoefficient#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#, #invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #primaryId#, #price#, #amount#, #storageType#)
</insert>
<delete id="delete">
......@@ -270,7 +285,10 @@
<update id="update">
UPDATE ${hggpSchema}.HGKC003A
SET
QUALITY_DETAIL_ID = #qualityDetailId#,<!-- 企业编码 -->
QUALITY_ID = #qualityId#,<!-- 质检单ID -->
RECTIFICATION_ID = #rectificationId#,<!-- 整改通知单ID -->
PART_SPEC_ID = #partSpecId#,<!-- 零件规格ID -->
PART_COEFFICIENT = #partCoefficient#,<!-- 零件系数 -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
......
package com.baosight.hggp.hg.kc.tools;
import cn.hutool.core.collection.CollectionUtil;
import com.baosight.hggp.common.CheckTypeEnum;
import com.baosight.hggp.core.dao.DaoBase;
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.kc.domain.*;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
......@@ -145,21 +151,103 @@ public class HGKCTools {
private static void checkSaveData(HGKC003 hgkc003,List<HGKC003A> hgkc003aList) {
AssertUtils.isEmpty(hgkc003.getCompanyCode(), "公司编码不能为空!");
AssertUtils.isEmpty(hgkc003.getCompanyName(), "公司名称不能为空!");
AssertUtils.isEmpty(hgkc003.getWhCode(), "仓库编码不能为空!");
AssertUtils.isEmpty(hgkc003.getWhName(), "仓库名称不能为空!");
AssertUtils.isEmpty(hgkc003.getProjCode(), "项目编号不能为空!");
AssertUtils.isEmpty(hgkc003.getProjName(), "项目名称不能为空!");
AssertUtils.isTrue(Objects.isNull(hgkc003.getQualityId())||hgkc003.getQualityId()<=0, "质检单ID不能为空!");
for(HGKC003A hgkc003a : hgkc003aList){
AssertUtils.isEmpty(hgkc003a.getCompanyCode(), "公司编码不能为空!");
AssertUtils.isEmpty(hgkc003a.getCompanyName(), "公司名称不能为空!");
AssertUtils.isEmpty(hgkc003a.getProjCode(), "项目编号不能为空!");
AssertUtils.isEmpty(hgkc003a.getProjName(), "项目名称不能为空!");
AssertUtils.isEmpty(hgkc003a.getWhCode(), "仓库编码不能为空!");
AssertUtils.isEmpty(hgkc003a.getWhName(), "仓库名称不能为空!");
AssertUtils.isEmpty(hgkc003a.getPrdtCode(), "存货编码不能为空!");
AssertUtils.isEmpty(hgkc003a.getPrdtName(), "存货名称不能为空!");
AssertUtils.isTrue(Objects.isNull(hgkc003a.getQualityDetailId())||hgkc003a.getQualityDetailId()<=0, "质检单明细ID不能为空!");
}
/**
* 校验生产入库信息,整改单就不用校验了
* @param hgzl002List
*/
public static void putInStorageCheckData(List<HGZL002> hgzl002List) {
for(HGZL002 hgzl002 : hgzl002List){
AssertUtils.isTrue(hgzl002.getPassQuantity().compareTo(0) <= 0, "合格数量小于等于0!");
AssertUtils.isEmpty(hgzl002.getCompanyCode(), "公司编码不能为空!");
AssertUtils.isEmpty(hgzl002.getCompanyName(), "公司名称不能为空!");
AssertUtils.isEmpty(hgzl002.getProjCode(), "项目编号不能为空!");
AssertUtils.isEmpty(hgzl002.getProjName(), "项目名称不能为空!");
AssertUtils.isEmpty(hgzl002.getProductCode(), "存货编码不能为空!");
AssertUtils.isEmpty(hgzl002.getProductName(), "存货名称不能为空!");
AssertUtils.isTrue(Objects.isNull(hgzl002.getId())||hgzl002.getId()<=0, "质检单明细ID不能为空!");
}
}
/**
* 生产入库(工序质检单)
* @param hgzl002List
*/
public static void putInStorageData(List<HGZL002> hgzl002List) {
List<HGKC003> hgkc003List = new LinkedList<>();
setHgkc003Data(hgzl002List,hgkc003List, null);
DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List);
}
/**
* 对象赋值(工序质检单)
* @param hgzl002List
* @param code
*/
private static void setHgkc003Data(List<HGZL002> hgzl002List, List<HGKC003> hgkc003List, Integer code) {
List<String> inventCodes = hgzl002List.stream().map(HGZL002::getProductCode).collect(Collectors.toList());
List<HGPZ005> hgpz005List = HGPZTools.HgPz005.listByInventCodes(inventCodes);
hgzl002List.forEach(o->{
HGPZ005 hgpz005 = hgpz005List.stream().filter(h->h.getInventCode().equals(o.getProductCode())).findAny().orElse(null);
if(Objects.nonNull(hgpz005)){
HGKC003 hgkc003 = new HGKC003();
hgkc003.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_DEPOSIT_NO));
hgkc003.setQualityId(o.getId());
hgkc003.setSubmitStatus(HGConstant.ProductStatus.WTJ);
hgkc003.setCompanyCode(o.getCompanyCode());
hgkc003.setCompanyName(o.getCompanyName());
hgkc003.setAccountCode(o.getAccountCode());
hgkc003.setDepCode(o.getDepCode());
if(Objects.nonNull(code)){
//整改通知单
hgkc003.setInvQty(new BigDecimal(o.getUnpassQuantity()));
}else{
//工序质检单
hgkc003.setInvQty(new BigDecimal(o.getPassQuantity()));
}
//单重
BigDecimal invUnitWeight = HGPZTools.HgPz005.calcUnitWeight(hgpz005);
hgkc003.setInvUnitWeight(invUnitWeight);
//总重
BigDecimal invWeight = invUnitWeight.multiply(hgkc003.getInvQty());
hgkc003.setInvWeight(invWeight);
hgkc003.setProjCode(o.getProjCode());
hgkc003.setProjName(o.getProjName());
hgkc003.setPartCode(o.getProductCode());
hgkc003.setPartName(o.getProductName());
hgkc003.setPartType(o.getProductType());
hgkc003.setPartSpecId(hgpz005.getId());
hgkc003.setPartSpec(hgpz005.getSpec());
hgkc003.setPartCoefficient(hgpz005.getCoefficient());
hgkc003.setPartLength(hgpz005.getLength());
hgkc003.setPartWidth(hgpz005.getWidth());
hgkc003.setPartThick(hgpz005.getThick());
hgkc003List.add(hgkc003);
}
});
}
/**
* 生产入库(整改通知单)
* @param ids
*/
public static void putInStorageByHgzl004(List<Long> ids) {
List<HGKC003> hgkc003List = new LinkedList<>();
Map<String, Object> paramMap = new HashMap();
paramMap.put("ids", ids);
paramMap.put("checkType", CheckTypeEnum.PROCESS_CHECK.getCode());
List<HGZL004> hgzl004List = DaoBase.getInstance().query(HGZL004.QUERY, paramMap);
//获取工序质检单信息,里面包含了不合格数量,在整改单审批通过时就取不合格数量
List<Long> checkIds = hgzl004List.stream().filter(o->o.getCheckType().equals(CheckTypeEnum.PROCESS_CHECK.getCode())).map(HGZL004::getCheckId).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(checkIds)){
Map<String, Object> checkParamMap = new HashMap();
checkParamMap.put("ids", checkIds);
List<HGZL002> hgzl002List = DaoBase.getInstance().query(HGZL002.QUERY, checkParamMap);
//赋值
setHgkc003Data(hgzl002List,hgkc003List,CheckTypeEnum.PROCESS_CHECK.getCode());
DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List);
}
}
......@@ -209,7 +297,7 @@ public class HGKCTools {
* @author:songx
* @date:2024/5/15,9:49
*/
public static class THGKC003A {
public static class Hgkc003a {
public static HGKC003A save(HGKC003A hgkc003a){
......@@ -228,7 +316,8 @@ public class HGKCTools {
AssertUtils.isEmpty(hgkc003a.getWhName(), "仓库名称不能为空!");
AssertUtils.isEmpty(hgkc003a.getPrdtCode(), "存货编码不能为空!");
AssertUtils.isEmpty(hgkc003a.getPrdtName(), "存货名称不能为空!");
AssertUtils.isTrue(Objects.isNull(hgkc003a.getQualityDetailId())||hgkc003a.getQualityDetailId()<=0, "质检单明细ID不能为空!");
AssertUtils.isTrue(Objects.isNull(hgkc003a.getPartSpecId())||hgkc003a.getPartSpecId()<=0, "存货id不能为空");
AssertUtils.isTrue(Objects.isNull(hgkc003a.getQualityId())||hgkc003a.getQualityId()<=0, "质检单明细ID不能为空!");
}
}
......@@ -469,7 +558,6 @@ public class HGKCTools {
paramMap.put("companyCode", companyCode);
paramMap.put("whCode", whCode);
paramMap.put("specId", specId);
paramMap.put("deleteFlag", 0);
List<HGKC010> results = DaoBase.getInstance().query(HGKC010.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
......
......@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.CheckStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.tools.HGZLTools;
......@@ -61,11 +62,15 @@ public class ServiceHGZL002 extends ServiceBase {
public EiInfo save(EiInfo inInfo) {
try {
List<HGZL002> hgzl002List = MapUtils.toDaoEPBase(inInfo,HGZL002.class);
//入库校验
HGKCTools.HgKc003.putInStorageCheckData(hgzl002List);
hgzl002List.forEach( o -> {
o.setCheckStatus(CheckStatusEnum.CHECKED.getCode());
DaoUtils.update(HGZL002.UPDATE,o);
HGZLTools.THGZL004.addByHGZL002(o);
});
HGKCTools.HgKc003.putInStorageData(hgzl002List);
// putInStorage();
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + hgzl002List.size() + "]条数据保存成功!");
......
......@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.HandleStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL004;
......@@ -101,6 +102,7 @@ public class ServiceHGZL004 extends ServiceBase {
// 销售单号
List<Long> ids = ObjectUtils.listKey(resultRows, "id");
DaoUtils.update(HGZL004.BATCH_COMPLETE, new HashMap<String,Object>(){{put("ids",ids);}});
HGKCTools.HgKc003.putInStorageByHgzl004(ids);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!");
......
......@@ -195,6 +195,9 @@
<isNotEmpty prepend=" AND " property="checkDateTo">
check_date &lt;= #checkDateTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......
......@@ -141,6 +141,9 @@
<isNotEmpty prepend=" AND " property="checkIds">
check_id IN <iterate close=")" open="(" conjunction="," property="checkIds">#checkIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......
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