Commit 76369964 by 江和松

生产入库工具类提交

parent af599cb1
...@@ -65,6 +65,12 @@ public class HGKC003 extends DaoEPBase { ...@@ -65,6 +65,12 @@ public class HGKC003 extends DaoEPBase {
public static final String FIELD_PART_THICK = "partThick"; /* 零件-厚*/ public static final String FIELD_PART_THICK = "partThick"; /* 零件-厚*/
public static final String FIELD_PART_SPEC = "partSpec"; /* 零件规格*/ public static final String FIELD_PART_SPEC = "partSpec"; /* 零件规格*/
public static final String FIELD_SUBMIT_STATUS = "submitStatus"; /* 提交状态 0未提交,1已提交*/ 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_ID = "ID";
public static final String COL_QUALITY_ID = "QUALITY_ID"; /* 质检单ID*/ public static final String COL_QUALITY_ID = "QUALITY_ID"; /* 质检单ID*/
...@@ -108,6 +114,12 @@ public class HGKC003 extends DaoEPBase { ...@@ -108,6 +114,12 @@ public class HGKC003 extends DaoEPBase {
public static final String COL_PART_THICK = "PART_THICK"; /* 零件-厚*/ 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 = "PART_SPEC"; /* 零件规格*/
public static final String COL_SUBMIT_STATUS = "SUBMIT_STATUS"; /* 提交状态 0未提交,1已提交*/ 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 QUERY = "HGKC003.query";
public static final String COUNT = "HGKC003.count"; public static final String COUNT = "HGKC003.count";
...@@ -159,6 +171,12 @@ public class HGKC003 extends DaoEPBase { ...@@ -159,6 +171,12 @@ public class HGKC003 extends DaoEPBase {
private BigDecimal partThick = new BigDecimal(0.000); /* 零件-厚*/ private BigDecimal partThick = new BigDecimal(0.000); /* 零件-厚*/
private String partSpec = " "; /* 零件规格*/ private String partSpec = " "; /* 零件规格*/
private Integer submitStatus; /* 提交状态 0未提交,1已提交*/ 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. * initialize the metadata.
...@@ -362,6 +380,39 @@ public class HGKC003 extends DaoEPBase { ...@@ -362,6 +380,39 @@ public class HGKC003 extends DaoEPBase {
eiColumn.setDescName("提交状态"); eiColumn.setDescName("提交状态");
eiMetadata.addMeta(eiColumn); 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 { ...@@ -1029,6 +1080,54 @@ public class HGKC003 extends DaoEPBase {
this.qualityId = 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 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. * get the value from Map.
* *
...@@ -1079,6 +1178,12 @@ public class HGKC003 extends DaoEPBase { ...@@ -1079,6 +1178,12 @@ public class HGKC003 extends DaoEPBase {
setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_THICK)), partThick)); setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_THICK)), partThick));
setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_SPEC)), partSpec)); setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_SPEC)), partSpec));
setSubmitStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SUBMIT_STATUS)), submitStatus)); 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 { ...@@ -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_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, StringUtils.toString(partSpec, eiMetadata.getMeta(FIELD_PART_SPEC)));
map.put(FIELD_SUBMIT_STATUS, StringUtils.toString(submitStatus, eiMetadata.getMeta(FIELD_SUBMIT_STATUS))); 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; return map;
} }
......
...@@ -23,7 +23,6 @@ public class HGKC003A extends DaoEPBase { ...@@ -23,7 +23,6 @@ public class HGKC003A extends DaoEPBase {
private static final long serialVersionUID = 1L; 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_QUALITY_DETAIL_ID = "qualityDetailId"; /* 质检单明细ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/ public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
...@@ -67,9 +66,13 @@ public class HGKC003A extends DaoEPBase { ...@@ -67,9 +66,13 @@ public class HGKC003A extends DaoEPBase {
public static final String FIELD_PRICE = "price"; /* 单价*/ public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/ public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_STORAGE_TYPE = "storageType"; /* 入库类型:0:入库 1:退回*/ 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_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_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/ public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
...@@ -114,6 +117,10 @@ public class HGKC003A extends DaoEPBase { ...@@ -114,6 +117,10 @@ public class HGKC003A extends DaoEPBase {
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/ public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
public static final String COL_STORAGE_TYPE = "STORAGE_TYPE"; /* 入库类型:0:入库 1:退回*/ 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 QUERY = "HGKC003A.query";
public static final String COUNT = "HGKC003A.count"; public static final String COUNT = "HGKC003A.count";
public static final String INSERT = "HGKC003A.insert"; public static final String INSERT = "HGKC003A.insert";
...@@ -122,7 +129,7 @@ public class HGKC003A extends DaoEPBase { ...@@ -122,7 +129,7 @@ public class HGKC003A extends DaoEPBase {
public static final String BATCH_DELETE = "HGKC003A.batchDelete"; public static final String BATCH_DELETE = "HGKC003A.batchDelete";
private Long id = new Long(0); 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 accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/ private String createdBy = " "; /* 记录创建者*/
...@@ -167,6 +174,11 @@ public class HGKC003A extends DaoEPBase { ...@@ -167,6 +174,11 @@ public class HGKC003A extends DaoEPBase {
private BigDecimal amount = new BigDecimal("0"); /* 金额*/ private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private Boolean storageType; /* 入库类型:0:入库 1:退回*/ 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. * initialize the metadata.
*/ */
...@@ -178,8 +190,8 @@ public class HGKC003A extends DaoEPBase { ...@@ -178,8 +190,8 @@ public class HGKC003A extends DaoEPBase {
eiColumn.setDescName(" "); eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUALITY_DETAIL_ID); eiColumn = new EiColumn(FIELD_QUALITY_ID);
eiColumn.setDescName("质检单明细ID"); eiColumn.setDescName("质检单ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE); eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
...@@ -387,6 +399,21 @@ public class HGKC003A extends DaoEPBase { ...@@ -387,6 +399,21 @@ public class HGKC003A extends DaoEPBase {
eiColumn.setDescName("入库类型:0:入库 1:退回"); eiColumn.setDescName("入库类型:0:入库 1:退回");
eiMetadata.addMeta(eiColumn); 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 { ...@@ -1102,12 +1129,36 @@ public class HGKC003A extends DaoEPBase {
this.storageType = storageType; this.storageType = storageType;
} }
public Long getQualityDetailId() { public Long getQualityId() {
return qualityDetailId; 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) { public void setPartCoefficient(BigDecimal partCoefficient) {
this.qualityDetailId = qualityDetailId; this.partCoefficient = partCoefficient;
} }
/** /**
...@@ -1119,7 +1170,7 @@ public class HGKC003A extends DaoEPBase { ...@@ -1119,7 +1170,7 @@ public class HGKC003A extends DaoEPBase {
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); 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)); setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
...@@ -1163,6 +1214,9 @@ public class HGKC003A extends DaoEPBase { ...@@ -1163,6 +1214,9 @@ public class HGKC003A extends DaoEPBase {
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price)); setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount)); setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setStorageType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_STORAGE_TYPE)), storageType)); 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 { ...@@ -1173,7 +1227,7 @@ public class HGKC003A extends DaoEPBase {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); 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_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_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
...@@ -1217,6 +1271,9 @@ public class HGKC003A extends DaoEPBase { ...@@ -1217,6 +1271,9 @@ public class HGKC003A extends DaoEPBase {
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE))); 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_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_STORAGE_TYPE, StringUtils.toString(storageType, eiMetadata.getMeta(FIELD_STORAGE_TYPE))); 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; return map;
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <sqlMap namespace="HGKC003">
<sql id="column"> <sql id="condition">
ID as "id", <isNotEmpty prepend=" AND " property="id">
QUALITY_ID as "qualityId", <!-- 质检单id --> ID = #id#
ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> </isNotEmpty>
DEP_CODE as "depCode", <!-- 部门编码 --> <isNotEmpty prepend=" AND " property="accountCode">
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="accountCode">
ACCOUNT_CODE = #accountCode# ACCOUNT_CODE = #accountCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </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"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -74,7 +49,16 @@ ...@@ -74,7 +49,16 @@
WH_CODE = #whCode# WH_CODE = #whCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whName"> <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>
<isNotEmpty prepend=" AND " property="depositNoOld"> <isNotEmpty prepend=" AND " property="depositNoOld">
DEPOSIT_NO_OLD = #depositNoOld# DEPOSIT_NO_OLD = #depositNoOld#
...@@ -139,159 +123,225 @@ ...@@ -139,159 +123,225 @@
<isNotEmpty prepend=" AND " property="partSpec"> <isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec# PART_SPEC = #partSpec#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus"> <isNotEmpty prepend=" AND " property="price">
SUBMIT_STATUS = #submitStatus# PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="storageType">
STORAGE_TYPE = #storageType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="qualityId"> <isNotEmpty prepend=" AND " property="qualityId">
QUALITY_ID = #qualityId# QUALITY_ID = #qualityId#
</isNotEmpty> </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>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
</sql> </sql>
<sql id="idCondition"> <select id="query" parameterClass="java.util.HashMap"
<isNotEmpty prepend=" AND " property="id"> resultClass="com.baosight.hggp.hg.kc.domain.HGKC003">
ID = #id# SELECT
</isNotEmpty> ID as "id",
<isNotEmpty prepend=" AND " property="depositNos"> QUALITY_ID as "qualityId",<!-- 质检单明细ID -->
DEPOSIT_NO IN <iterate open="(" close=")" conjunction="," property="depositNos">#depositNos[]#</iterate> RECTIFICATION_ID as "rectificationId",<!-- 整改通知单ID -->
</isNotEmpty> PART_SPEC_ID as "partSpecId",<!-- 零件规格ID -->
</sql> PART_COEFFICIENT as "partCoefficient",<!-- 零件系数 -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
<sql id="customCondition"> DEP_CODE as "depCode", <!-- 部门编码 -->
<include refid="BaseCondition.specCondition"/> CREATED_BY as "createdBy", <!-- 记录创建者 -->
<include refid="BaseCondition.createdTimeCondition"/> CREATED_NAME as "createdName", <!-- 记录创建名称 -->
</sql> 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 asc
</isEmpty>
</dynamic>
<!-- 公共修改字段 --> </select>
<sql id="updateRevise">
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.kc.domain.HGKC003"> <select id="count" resultClass="int">
SELECT SELECT COUNT(*) FROM ${hggpSchema}.HGKC003 WHERE 1=1
<include refid="column"/> <include refid="condition" />
FROM ${hggpSchema}.HGKC003 WHERE 1=1 </select>
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC003 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGKC003 ( INSERT INTO ${hggpSchema}.HGKC003 (
QUALITY_ID, <!-- 企业编码 --> QUALITY_ID,<!-- 质检单ID -->
ACCOUNT_CODE, <!-- 企业编码 --> PART_SPEC_ID,<!-- 零件规格ID -->
DEP_CODE, <!-- 部门编码 --> RECTIFICATION_ID,<!-- 整改通知单ID -->
CREATED_BY, <!-- 记录创建者 --> PART_COEFFICIENT,<!-- 零件系数 -->
CREATED_NAME, <!-- 记录创建名称 --> ACCOUNT_CODE, <!-- 企业编码 -->
CREATED_TIME, <!-- 记录创建时间 --> DEP_CODE, <!-- 部门编码 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 --> CREATED_BY, <!-- 记录创建者 -->
COMPANY_CODE, <!-- 公司编码 --> CREATED_NAME, <!-- 记录创建名称 -->
COMPANY_NAME, <!-- 公司名称 --> CREATED_TIME, <!-- 记录创建时间 -->
DEPOSIT_DATE, <!-- 入库日期 --> UPDATED_BY, <!-- 记录修改者 -->
DEPOSIT_NO, <!-- 入库单号 --> UPDATED_NAME, <!-- 记录修改名称 -->
WH_CODE, <!-- 仓库编码 --> UPDATED_TIME, <!-- 记录修改时间 -->
WH_NAME, <!-- 仓库名称 --> DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
INV_QTY, <!-- 数量 --> COMPANY_CODE, <!-- 公司编码 -->
INV_UNIT_WEIGHT, <!-- 单重 --> COMPANY_NAME, <!-- 公司名称 -->
INV_WEIGHT, <!-- 重量 --> DEPOSIT_DATE, <!-- 入库日期 -->
DEPOSIT_NO_OLD, <!-- 入库单号(旧) --> DEPOSIT_NO, <!-- 入库单号 -->
REMARK, <!-- 备注 --> WH_CODE, <!-- 仓库编码 -->
FACTORY_CODE, <!-- 工厂代码 --> WH_NAME, <!-- 仓库名称 -->
PROD_ORDER_NO, <!-- 生产订单号 --> INV_QTY, <!-- 数量 -->
PROD_TASK_NO, <!-- 生产任务号 --> INV_UNIT_WEIGHT, <!-- 单重 -->
PROJ_CODE, <!-- 项目编码 --> INV_WEIGHT, <!-- 重量 -->
PROJ_NAME, <!-- 项目名称 --> DEPOSIT_NO_OLD, <!-- 入库单号(旧) -->
PRDT_TYPE, <!-- 产品类型 --> REMARK, <!-- 备注 -->
PRDT_CODE, <!-- 产品编码 --> FACTORY_CODE, <!-- 工厂代码 -->
PRDT_NAME, <!-- 产品名称 --> PROD_ORDER_NO, <!-- 生产订单号 -->
PRDT_LENGTH, <!-- 产品-长 --> PROD_TASK_NO, <!-- 生产任务号 -->
PRDT_WIDTH, <!-- 产品-宽 --> PROJ_CODE, <!-- 项目编码 -->
PRDT_THICK, <!-- 产品-厚 --> PROJ_NAME, <!-- 项目名称 -->
PRDT_SPEC, <!-- 产品规格 --> PRDT_TYPE, <!-- 产品类型 -->
PART_TYPE, <!-- 零件类型 --> PRDT_CODE, <!-- 产品编码 -->
PART_CODE, <!-- 零件编码 --> PRDT_NAME, <!-- 产品名称 -->
PART_NAME, <!-- 零件名称 --> PRDT_LENGTH, <!-- 产品-长 -->
PART_LENGTH, <!-- 零件-长 --> PRDT_WIDTH, <!-- 产品-宽 -->
PART_WIDTH, <!-- 零件-宽 --> PRDT_THICK, <!-- 产品-厚 -->
PART_THICK, <!-- 零件-厚 --> PRDT_SPEC, <!-- 产品规格 -->
PART_SPEC, <!-- 零件规格 --> PART_TYPE, <!-- 零件类型 -->
SUBMIT_STATUS <!-- 提交状态 --> PART_CODE, <!-- 零件编码 -->
) VALUES ( PART_NAME, <!-- 零件名称 -->
#qualityId#,#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, PART_LENGTH, <!-- 零件-长 -->
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#, PART_WIDTH, <!-- 零件-宽 -->
#invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, PART_THICK, <!-- 零件-厚 -->
#projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, PART_SPEC, <!-- 零件规格 -->
#partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #submitStatus# PRICE, <!-- 单价 -->
) AMOUNT, <!-- 金额 -->
</insert> 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"> <delete id="delete">
DELETE FROM ${hggpSchema}.HGKC003 WHERE DELETE FROM ${hggpSchema}.HGKC003 WHERE
ID = #id# ID = #id#
</delete> </delete>
<delete id="batchDelete">
DELETE FROM ${hggpSchema}.HGKC003 WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</delete>
<update id="update"> <update id="update">
UPDATE ${hggpSchema}.HGKC003 UPDATE ${hggpSchema}.HGKC003
SET SET
QUALITY_ID = #qualityId#, <!-- 质检单id --> QUALITY_ID = #qualityId#,<!-- 质检单ID -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 --> RECTIFICATION_ID = #rectificationId#,<!-- 整改通知单ID -->
DEP_CODE = #depCode#, <!-- 部门编码 --> PART_SPEC_ID = #partSpecId#,<!-- 零件规格ID -->
CREATED_BY = #createdBy#, <!-- 记录创建者 --> PART_COEFFICIENT = #partCoefficient#,<!-- 零件系数 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 --> ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 --> CREATED_BY = #createdBy#, <!-- 记录创建者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 --> UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEPOSIT_DATE = #depositDate#, <!-- 入库日期 --> DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
DEPOSIT_NO = #depositNo#, <!-- 入库单号 --> COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
WH_CODE = #whCode#, <!-- 仓库编码 --> COMPANY_NAME = #companyName#, <!-- 公司名称 -->
WH_NAME = #whName#, <!-- 仓库名称 --> DEPOSIT_DATE = #depositDate#, <!-- 入库日期 -->
INV_QTY = #invQty#, <!-- 数量 --> DEPOSIT_NO = #depositNo#, <!-- 入库单号 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 单重 --> WH_CODE = #whCode#, <!-- 仓库编码 -->
INV_WEIGHT = #invWeight#, <!-- 重量 --> WH_NAME = #whName#, <!-- 仓库名称 -->
DEPOSIT_NO_OLD = #depositNoOld#, <!-- 入库单号(旧) --> INV_QTY = #invQty#, <!-- 数量 -->
REMARK = #remark#, <!-- 备注 --> INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 单重 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂代码 --> INV_WEIGHT = #invWeight#, <!-- 重量 -->
PROD_ORDER_NO = #prodOrderNo#, <!-- 生产订单号 --> DEPOSIT_NO_OLD = #depositNoOld#, <!-- 入库单号(旧) -->
PROD_TASK_NO = #prodTaskNo#, <!-- 生产任务号 --> REMARK = #remark#, <!-- 备注 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> FACTORY_CODE = #factoryCode#, <!-- 工厂代码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROD_ORDER_NO = #prodOrderNo#, <!-- 生产订单号 -->
PRDT_TYPE = #prdtType#, <!-- 产品类型 --> PROD_TASK_NO = #prodTaskNo#, <!-- 生产任务号 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PRDT_LENGTH = #prdtLength#, <!-- 产品-长 --> PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_THICK = #prdtThick#, <!-- 产品-厚 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_SPEC = #prdtSpec#, <!-- 产品规格 --> PRDT_LENGTH = #prdtLength#, <!-- 产品-长 -->
PART_TYPE = #partType#, <!-- 零件类型 --> PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PART_CODE = #partCode#, <!-- 零件编码 --> PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
PART_NAME = #partName#, <!-- 零件名称 --> PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
PART_LENGTH = #partLength#, <!-- 零件-长 --> PART_TYPE = #partType#, <!-- 零件类型 -->
PART_WIDTH = #partWidth#, <!-- 零件-宽 --> PART_CODE = #partCode#, <!-- 零件编码 -->
PART_THICK = #partThick#, <!-- 零件-厚 --> PART_NAME = #partName#, <!-- 零件名称 -->
PART_SPEC = #partSpec#, <!-- 零件规格 --> PART_LENGTH = #partLength#, <!-- 零件-长 -->
SUBMIT_STATUS = #submitStatus# <!-- 提交状态 --> PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
WHERE PART_THICK = #partThick#, <!-- 零件-厚 -->
ID = #id# PART_SPEC = #partSpec#, <!-- 零件规格 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
STORAGE_TYPE = #storageType#, <!-- 入库类型:0:入库 1:退回 -->
SUBMIT_STATUS = #submitStatus# <!-- 提交状态 -->
WHERE
ID = #id#
</update> </update>
<update id="updateSubmitStatus"> <update id="updateSubmitStatus">
......
...@@ -135,8 +135,17 @@ ...@@ -135,8 +135,17 @@
<isNotEmpty prepend=" AND " property="storageType"> <isNotEmpty prepend=" AND " property="storageType">
STORAGE_TYPE = #storageType# STORAGE_TYPE = #storageType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="qualityDetailId"> <isNotEmpty prepend=" AND " property="qualityId">
QUALITY_DETAIL_ID = #qualityDetailId# 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> </isNotEmpty>
</sql> </sql>
...@@ -144,7 +153,10 @@ ...@@ -144,7 +153,10 @@
resultClass="com.baosight.hggp.hg.kc.domain.HGKC003A"> resultClass="com.baosight.hggp.hg.kc.domain.HGKC003A">
SELECT SELECT
ID as "id", 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", <!-- 企业编码 --> ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 --> CREATED_BY as "createdBy", <!-- 记录创建者 -->
...@@ -209,7 +221,10 @@ ...@@ -209,7 +221,10 @@
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGKC003A ( INSERT INTO ${hggpSchema}.HGKC003A (
QUALITY_DETAIL_ID,<!-- 企业编码 --> QUALITY_ID,<!-- 质检单ID -->
RECTIFICATION_ID,<!-- 整改通知单ID -->
PART_SPEC_ID,<!-- 零件规格ID -->
PART_COEFFICIENT,<!-- 零件系数 -->
ACCOUNT_CODE, <!-- 企业编码 --> ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 --> CREATED_BY, <!-- 记录创建者 -->
...@@ -254,7 +269,7 @@ ...@@ -254,7 +269,7 @@
AMOUNT, <!-- 金额 --> AMOUNT, <!-- 金额 -->
STORAGE_TYPE <!-- 入库类型:0:入库 1:退回 --> 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> </insert>
<delete id="delete"> <delete id="delete">
...@@ -270,7 +285,10 @@ ...@@ -270,7 +285,10 @@
<update id="update"> <update id="update">
UPDATE ${hggpSchema}.HGKC003A UPDATE ${hggpSchema}.HGKC003A
SET SET
QUALITY_DETAIL_ID = #qualityDetailId#,<!-- 企业编码 --> QUALITY_ID = #qualityId#,<!-- 质检单ID -->
RECTIFICATION_ID = #rectificationId#,<!-- 整改通知单ID -->
PART_SPEC_ID = #partSpecId#,<!-- 零件规格ID -->
PART_COEFFICIENT = #partCoefficient#,<!-- 零件系数 -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 --> ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 --> CREATED_BY = #createdBy#, <!-- 记录创建者 -->
......
package com.baosight.hggp.hg.kc.tools; package com.baosight.hggp.hg.kc.tools;
import cn.hutool.core.collection.CollectionUtil; 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.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.*; 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.AssertUtils;
import com.baosight.hggp.util.StringUtils; import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -145,21 +151,103 @@ public class HGKCTools { ...@@ -145,21 +151,103 @@ public class HGKCTools {
private static void checkSaveData(HGKC003 hgkc003,List<HGKC003A> hgkc003aList) { private static void checkSaveData(HGKC003 hgkc003,List<HGKC003A> hgkc003aList) {
AssertUtils.isEmpty(hgkc003.getCompanyCode(), "公司编码不能为空!"); AssertUtils.isEmpty(hgkc003.getCompanyCode(), "公司编码不能为空!");
AssertUtils.isEmpty(hgkc003.getCompanyName(), "公司名称不能为空!"); AssertUtils.isEmpty(hgkc003.getCompanyName(), "公司名称不能为空!");
AssertUtils.isEmpty(hgkc003.getWhCode(), "仓库编码不能为空!");
AssertUtils.isEmpty(hgkc003.getWhName(), "仓库名称不能为空!");
AssertUtils.isEmpty(hgkc003.getProjCode(), "项目编号不能为空!"); AssertUtils.isEmpty(hgkc003.getProjCode(), "项目编号不能为空!");
AssertUtils.isEmpty(hgkc003.getProjName(), "项目名称不能为空!"); AssertUtils.isEmpty(hgkc003.getProjName(), "项目名称不能为空!");
AssertUtils.isTrue(Objects.isNull(hgkc003.getQualityId())||hgkc003.getQualityId()<=0, "质检单ID不能为空!"); 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(), "项目名称不能为空!"); * @param hgzl002List
AssertUtils.isEmpty(hgkc003a.getWhCode(), "仓库编码不能为空!"); */
AssertUtils.isEmpty(hgkc003a.getWhName(), "仓库名称不能为空!"); public static void putInStorageCheckData(List<HGZL002> hgzl002List) {
AssertUtils.isEmpty(hgkc003a.getPrdtCode(), "存货编码不能为空!"); for(HGZL002 hgzl002 : hgzl002List){
AssertUtils.isEmpty(hgkc003a.getPrdtName(), "存货名称不能为空!"); AssertUtils.isTrue(hgzl002.getPassQuantity().compareTo(0) <= 0, "合格数量小于等于0!");
AssertUtils.isTrue(Objects.isNull(hgkc003a.getQualityDetailId())||hgkc003a.getQualityDetailId()<=0, "质检单明细ID不能为空!"); 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 { ...@@ -209,7 +297,7 @@ public class HGKCTools {
* @author:songx * @author:songx
* @date:2024/5/15,9:49 * @date:2024/5/15,9:49
*/ */
public static class THGKC003A { public static class Hgkc003a {
public static HGKC003A save(HGKC003A hgkc003a){ public static HGKC003A save(HGKC003A hgkc003a){
...@@ -228,7 +316,8 @@ public class HGKCTools { ...@@ -228,7 +316,8 @@ public class HGKCTools {
AssertUtils.isEmpty(hgkc003a.getWhName(), "仓库名称不能为空!"); AssertUtils.isEmpty(hgkc003a.getWhName(), "仓库名称不能为空!");
AssertUtils.isEmpty(hgkc003a.getPrdtCode(), "存货编码不能为空!"); AssertUtils.isEmpty(hgkc003a.getPrdtCode(), "存货编码不能为空!");
AssertUtils.isEmpty(hgkc003a.getPrdtName(), "存货名称不能为空!"); 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 { ...@@ -469,7 +558,6 @@ public class HGKCTools {
paramMap.put("companyCode", companyCode); paramMap.put("companyCode", companyCode);
paramMap.put("whCode", whCode); paramMap.put("whCode", whCode);
paramMap.put("specId", specId); paramMap.put("specId", specId);
paramMap.put("deleteFlag", 0);
List<HGKC010> results = DaoBase.getInstance().query(HGKC010.QUERY, paramMap); List<HGKC010> results = DaoBase.getInstance().query(HGKC010.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0); return CollectionUtils.isEmpty(results) ? null : results.get(0);
} }
......
...@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; ...@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.CheckStatusEnum; import com.baosight.hggp.common.CheckStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL002; import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.tools.HGZLTools; import com.baosight.hggp.hg.zl.tools.HGZLTools;
...@@ -20,7 +21,7 @@ import java.util.List; ...@@ -20,7 +21,7 @@ import java.util.List;
* @date 2025年05月29日 17:18 * @date 2025年05月29日 17:18
*/ */
public class ServiceHGZL002 extends ServiceBase { public class ServiceHGZL002 extends ServiceBase {
/** /**
* 画面初始化 * 画面初始化
* *
...@@ -38,7 +39,7 @@ public class ServiceHGZL002 extends ServiceBase { ...@@ -38,7 +39,7 @@ public class ServiceHGZL002 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 查询操作 * 查询操作
* *
...@@ -61,11 +62,15 @@ public class ServiceHGZL002 extends ServiceBase { ...@@ -61,11 +62,15 @@ public class ServiceHGZL002 extends ServiceBase {
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<HGZL002> hgzl002List = MapUtils.toDaoEPBase(inInfo,HGZL002.class); List<HGZL002> hgzl002List = MapUtils.toDaoEPBase(inInfo,HGZL002.class);
//入库校验
HGKCTools.HgKc003.putInStorageCheckData(hgzl002List);
hgzl002List.forEach( o -> { hgzl002List.forEach( o -> {
o.setCheckStatus(CheckStatusEnum.CHECKED.getCode()); o.setCheckStatus(CheckStatusEnum.CHECKED.getCode());
DaoUtils.update(HGZL002.UPDATE,o); DaoUtils.update(HGZL002.UPDATE,o);
HGZLTools.THGZL004.addByHGZL002(o); HGZLTools.THGZL004.addByHGZL002(o);
}); });
HGKCTools.HgKc003.putInStorageData(hgzl002List);
// putInStorage();
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + hgzl002List.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + hgzl002List.size() + "]条数据保存成功!");
......
...@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; ...@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.HandleStatusEnum; import com.baosight.hggp.common.HandleStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.sc.domain.HGSC004; import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL004; import com.baosight.hggp.hg.zl.domain.HGZL004;
...@@ -24,7 +25,7 @@ import java.util.Map; ...@@ -24,7 +25,7 @@ import java.util.Map;
* @date 2025年05月29日 17:18 * @date 2025年05月29日 17:18
*/ */
public class ServiceHGZL004 extends ServiceBase { public class ServiceHGZL004 extends ServiceBase {
/** /**
* 画面初始化 * 画面初始化
* *
...@@ -42,7 +43,7 @@ public class ServiceHGZL004 extends ServiceBase { ...@@ -42,7 +43,7 @@ public class ServiceHGZL004 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 查询操作 * 查询操作
* *
...@@ -101,6 +102,7 @@ public class ServiceHGZL004 extends ServiceBase { ...@@ -101,6 +102,7 @@ public class ServiceHGZL004 extends ServiceBase {
// 销售单号 // 销售单号
List<Long> ids = ObjectUtils.listKey(resultRows, "id"); List<Long> ids = ObjectUtils.listKey(resultRows, "id");
DaoUtils.update(HGZL004.BATCH_COMPLETE, new HashMap<String,Object>(){{put("ids",ids);}}); DaoUtils.update(HGZL004.BATCH_COMPLETE, new HashMap<String,Object>(){{put("ids",ids);}});
HGKCTools.HgKc003.putInStorageByHgzl004(ids);
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!");
......
...@@ -195,6 +195,9 @@ ...@@ -195,6 +195,9 @@
<isNotEmpty prepend=" AND " property="checkDateTo"> <isNotEmpty prepend=" AND " property="checkDateTo">
check_date &lt;= #checkDateTo# check_date &lt;= #checkDateTo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
......
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
Version : 1.0 Version : 1.0
schema : hggp schema : hggp
tableName : HGZL004 tableName : HGZL004
id BIGINT NOT NULL primarykey, id BIGINT NOT NULL primarykey,
check_id BIGINT NOT NULL, check_id BIGINT NOT NULL,
company_code VARCHAR NOT NULL, company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL, company_name VARCHAR NOT NULL,
dep_code VARCHAR, dep_code VARCHAR,
dep_name VARCHAR, dep_name VARCHAR,
proj_code VARCHAR, proj_code VARCHAR,
proj_name VARCHAR, proj_name VARCHAR,
handle_status TINYINT, handle_status TINYINT,
quality_problem VARCHAR, quality_problem VARCHAR,
process_sugges VARCHAR, process_sugges VARCHAR,
rectificat_sugges VARCHAR, rectificat_sugges VARCHAR,
check_type TINYINT, check_type TINYINT,
check_code VARCHAR, check_code VARCHAR,
product_type TINYINT, product_type TINYINT,
product_code VARCHAR, product_code VARCHAR,
product_name VARCHAR, product_name VARCHAR,
factory_code VARCHAR, factory_code VARCHAR,
factory_name VARCHAR, factory_name VARCHAR,
group_code VARCHAR, group_code VARCHAR,
group_name VARCHAR, group_name VARCHAR,
work_by VARCHAR, work_by VARCHAR,
work_name VARCHAR, work_name VARCHAR,
check_by VARCHAR, check_by VARCHAR,
check_name VARCHAR, check_name VARCHAR,
account_code VARCHAR NOT NULL, account_code VARCHAR NOT NULL,
created_by VARCHAR, created_by VARCHAR,
created_name VARCHAR, created_name VARCHAR,
created_time VARCHAR, created_time VARCHAR,
updated_by VARCHAR, updated_by VARCHAR,
updated_name VARCHAR, updated_name VARCHAR,
updated_time VARCHAR updated_time VARCHAR
--> -->
<sqlMap namespace="HGZL004"> <sqlMap namespace="HGZL004">
...@@ -141,12 +141,15 @@ ...@@ -141,12 +141,15 @@
<isNotEmpty prepend=" AND " property="checkIds"> <isNotEmpty prepend=" AND " property="checkIds">
check_id IN <iterate close=")" open="(" conjunction="," property="checkIds">#checkIds[]#</iterate> check_id IN <iterate close=")" open="(" conjunction="," property="checkIds">#checkIds[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.zl.domain.HGZL004"> resultClass="com.baosight.hggp.hg.zl.domain.HGZL004">
SELECT SELECT
id as "id", id as "id",
check_id as "checkId", <!-- 质检单ID --> check_id as "checkId", <!-- 质检单ID -->
company_code as "companyCode", <!-- 公司编码 --> company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 --> company_name as "companyName", <!-- 公司名称 -->
......
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