Commit e25e5b1d by 江和松

库存盘点单增加提交状态操作。

parent a95def62
......@@ -22,7 +22,7 @@ public class HGKC005 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
......@@ -54,9 +54,10 @@ public class HGKC005 extends DaoEPBase {
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_SUBMIT_STATUS = "submitStatus"; /* 提交状态*/
public static final String FIELD_IS_AMOUNT = "isAmount";
public static final String COL_ID = "ID";
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
......@@ -94,8 +95,9 @@ public class HGKC005 extends DaoEPBase {
public static final String INSERT = "HGKC005.insert";
public static final String UPDATE = "HGKC005.update";
public static final String DELETE = "HGKC005.delete";
public static final String UPDATE_SUBMIT_STATUS = "HGKC005.updateSubmitStatus";
private Long id = new Long(0);
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String receiptDate = " "; /* 单据日期*/
......@@ -127,6 +129,7 @@ public class HGKC005 extends DaoEPBase {
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer submitStatus; /* 提交状态*/
/**
* initialize the metadata.
......@@ -287,6 +290,9 @@ public class HGKC005 extends DaoEPBase {
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUBMIT_STATUS);
eiColumn.setDescName("提交状态");
eiMetadata.addMeta(eiColumn);
}
......@@ -308,7 +314,7 @@ public class HGKC005 extends DaoEPBase {
/**
* set the id .
*
* @param id
* @param id
*/
public void setId(Long id) {
this.id = id;
......@@ -809,6 +815,15 @@ public class HGKC005 extends DaoEPBase {
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getSubmitStatus() {
return submitStatus;
}
public void setSubmitStatus(Integer submitStatus) {
this.submitStatus = submitStatus;
}
/**
* get the value from Map.
*
......@@ -849,6 +864,7 @@ public class HGKC005 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setSubmitStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SUBMIT_STATUS)), submitStatus));
}
/**
......@@ -890,6 +906,7 @@ public class HGKC005 extends DaoEPBase {
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_SUBMIT_STATUS, StringUtils.toString(submitStatus, eiMetadata.getMeta(FIELD_SUBMIT_STATUS)));
return map;
}
......
......@@ -9,15 +9,21 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.domain.HGKC005;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
......@@ -126,7 +132,9 @@ public class ServiceHGKC005 extends ServiceEPBase {
if (fKc005.getId() == null || fKc005.getId() == 0) {
this.addData(fKc005);
} else {
// TODO 盘点不支持修改
// 设置基础信息
this.setBaseInfo(fKc005);
DaoUtils.update(HGKC005.UPDATE, fKc005);
}
}
}
......@@ -139,6 +147,7 @@ public class ServiceHGKC005 extends ServiceEPBase {
private void addData(HGKC005 fKc005) {
// 设置基础信息
this.setBaseInfo(fKc005);
fKc005.setSubmitStatus(HGConstant.ProductStatus.WTJ);
// 生成单据号
fKc005.setCheckNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CHECK_NO));
DaoUtils.insert(HGKC005.INSERT, fKc005);
......@@ -163,6 +172,20 @@ public class ServiceHGKC005 extends ServiceEPBase {
}
/**
* 校验保存的数据
*
* @param fKc005
*/
private void checkSubmitData(HGKC005 fKc005) {
AssertUtils.isEmpty(fKc005.getInventCode(), "存货类型不能为空");
AssertUtils.isEmpty(fKc005.getWhCode(), "仓库名称不能为空");
AssertUtils.isEmpty(fKc005.getInventCode(), "存货名称不能为空");
AssertUtils.isNull(fKc005.getInventRecordId(), "规格不能为空");
AssertUtils.isGt(BigDecimal.ZERO, fKc005.getBookAmount(), "账面数量必须大于0");
AssertUtils.isGt(BigDecimal.ZERO, fKc005.getEntityAmount(), "实物重量必须大于0");
}
/**
* 设置基础信息
*
* @param fKc005
......@@ -239,4 +262,40 @@ public class ServiceHGKC005 extends ServiceEPBase {
HGKCTools.updateStock(newKc005);
}
}
/**
* 修改提交状态
* @param inInfo
* @return
*/
public EiInfo updateSubmitStatus(EiInfo inInfo){
int i = 0;
try {
HGKC005 hgkc005 = new HGKC005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgkc005.fromMap(map);
hgkc005 = HGKCTools.HgKc005.getId(hgkc005.getId());
hgkc005.setSubmitStatus(HGConstant.ProductStatus.YTJ);
// 校验数据
this.checkSubmitData(hgkc005);
DaoUtils.update(HGKC005.UPDATE_SUBMIT_STATUS, hgkc005);
// //修改计划生产任务完工数量
// HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId(),HGConstant.StorageType.RK);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "提交")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
......@@ -147,6 +147,7 @@ public class ServiceHGKC005A extends ServiceEPBase {
newKc005.setRemark(entityRemark);
newKc005.setInventRecordId(dbKc010.getSpecId());
newKc005.setDeleteFlag(CommonConstant.YesNo.NO_0);
newKc005.setSubmitStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGKC005.INSERT, newKc005);
HGKCTools.updateStock(newKc005);
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-12 10:57:29
Version : 1.0
schema : hggp
tableName : HGKC005
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
RECEIPT_DATE VARCHAR NOT NULL,
CHECK_NO VARCHAR NOT NULL,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
INVENT_RECORD_ID BIGINT,
BOOK_AMOUNT DECIMAL,
BOOK_UNIT_WEIGHT DECIMAL,
BOOK_WEIGHT DECIMAL,
ENTITY_AMOUNT DECIMAL,
ENTITY_UNIT_WEIGHT DECIMAL,
ENTITY_WEIGHT DECIMAL,
DIFF_AMOUNT DECIMAL,
DIFF_WEIGHT DECIMAL,
KC_ID BIGINT,
STATUS TINYINT NOT NULL,
REMARK VARCHAR,
OLD_CHECK_NO VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGKC005">
<typeAlias alias="HGKC005" type="com.baosight.hggp.hg.kc.domain.HGKC005"/>
......@@ -137,6 +100,9 @@
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="checkNos">
......@@ -160,7 +126,7 @@
<select id="query" parameterClass="java.util.HashMap" resultClass="HGKC005">
SELECT
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
......@@ -191,7 +157,8 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
SUBMIT_STATUS as "submitStatus" <!-- 提交状态 -->
FROM ${hggpSchema}.HGKC005 WHERE 1=1
<include refid="condition" />
<include refid="customCondition"/>
......@@ -226,105 +193,6 @@
<include refid="customCondition"/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookAmount">
BOOK_AMOUNT = #bookAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookUnitWeight">
BOOK_UNIT_WEIGHT = #bookUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookWeight">
BOOK_WEIGHT = #bookWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityAmount">
ENTITY_AMOUNT = #entityAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityUnitWeight">
ENTITY_UNIT_WEIGHT = #entityUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityWeight">
ENTITY_WEIGHT = #entityWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="diffAmount">
DIFF_AMOUNT = #diffAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="diffWeight">
DIFF_WEIGHT = #diffWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="kcId">
KC_ID = #kcId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="oldCheckNo">
OLD_CHECK_NO = #oldCheckNo#
</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>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC005 (
ACCOUNT_CODE, <!-- 企业编码 -->
......@@ -357,9 +225,10 @@
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG <!-- 是否删除0.否1.是 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SUBMIT_STATUS <!-- 提交状态 -->
)
VALUES (#accountCode#, #depCode#, #receiptDate#, #checkNo#, #companyCode#, #companyName#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #bookUnitWeight#, #bookWeight#, #entityAmount#, #entityUnitWeight#, #entityWeight#, #diffAmount#, #diffWeight#, #kcId#, #status#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#)
VALUES (#accountCode#, #depCode#, #receiptDate#, #checkNo#, #companyCode#, #companyName#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #bookUnitWeight#, #bookWeight#, #entityAmount#, #entityUnitWeight#, #entityWeight#, #diffAmount#, #diffWeight#, #kcId#, #status#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #submitStatus#)
</insert>
<delete id="delete">
......@@ -436,4 +305,17 @@
GROUP BY DEP_CODE, COMPANY_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
<update id="updateSubmitStatus">
UPDATE ${hggpSchema}.HGKC005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
SUBMIT_STATUS = #submitStatus# <!-- 提交状态 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-24 16:31:28
Version : 1.0
schema : hggp
tableName : HGKC007
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
OTHER_OUT_DATE VARCHAR,
OTHER_OUT_NO VARCHAR NOT NULL,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
OTHER_OUT_NO_OLD VARCHAR,
REMARK VARCHAR,
FACTORY_CODE VARCHAR,
PROD_ORDER_NO VARCHAR,
PROD_TASK_NO VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRDT_TYPE TINYINT,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PRDT_LENGTH DECIMAL,
PRDT_WIDTH DECIMAL,
PRDT_THICK DECIMAL,
PRDT_SPEC VARCHAR,
PART_TYPE TINYINT,
PART_CODE VARCHAR,
PART_NAME VARCHAR,
PART_LENGTH DECIMAL,
PART_WIDTH DECIMAL,
PART_THICK DECIMAL,
PART_SPEC VARCHAR,
SUBMIT_STATUS TINYINT,
SOURCE TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGKC007">
<sql id="condition">
......@@ -169,7 +125,7 @@
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC007">
SELECT
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
......@@ -229,125 +185,6 @@
<update id="check">
UPDATE ${hggpSchema}.HGKC007 SET SUBMIT_STATUS = #submitStatus# WHERE ID = #id#
</update>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutDate">
OTHER_OUT_DATE = #otherOutDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNo">
OTHER_OUT_NO = #otherOutNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNoOld">
OTHER_OUT_NO_OLD = #otherOutNoOld#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtLength">
PRDT_LENGTH = #prdtLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtWidth">
PRDT_WIDTH = #prdtWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtThick">
PRDT_THICK = #prdtThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtSpec">
PRDT_SPEC = #prdtSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partType">
PART_TYPE = #partType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCode">
PART_CODE = #partCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
PART_NAME = #partName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partLength">
PART_LENGTH = #partLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partWidth">
PART_WIDTH = #partWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partThick">
PART_THICK = #partThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC007 (ID,
......
......@@ -517,6 +517,22 @@ public class HGKCTools {
*/
public static class HgKc005 {
/**
* 库存盘点单信息
*
* @param id
* @return
*/
public static HGKC005 getId(Long id) {
AssertUtils.isEmpty(Collections.singleton(id), "库存盘点单id为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put("id", id);
List<HGKC005> list = DaoBase.getInstance().query(HGKC005.QUERY, paramMap);
AssertUtils.isEmpty(list, "库存盘点单为空!");
return list.get(0);
}
/**
* 锁
*
......
let whNameGlobalData = [];
let inventNameGlobalData = [];
let specGlobalData = [];
$(function() {
whNameGlobalData = __eiInfo.getBlock("wh_record_block_id").getMappedRows();
inventNameGlobalData = __eiInfo.getBlock("invent_record_block_id").getMappedRows();
specGlobalData = __eiInfo.getBlock("spec_record_block_id").getMappedRows();
IPLATUI.EFGrid = {
pageable: {
pageSize: 20,
......@@ -21,7 +13,22 @@ $(function() {
// save: true, // 不显示保存按钮
// delete: true, // 显示删除按钮
},*/
columns: [{
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let status = item.submitStatus;
let template = '';
if (item.id){
if (status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateSubmitStatus(' + item.id + ')" >提交</a>';
}
}
return template;
}
},{
field: "receiptDate",
attributes: {
class: "i-input-readonly"
......@@ -29,45 +36,6 @@ $(function() {
defaultValue: function () {
return currShortDate();
}
}, {
field: "whCode",
template: function (dataItem) {
for (let i = 0; i < whNameGlobalData.length; i++) {
if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
return whNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-whType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ007");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "wh_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}, {
field: "inventRecordId",
template: function (dataItem) {
for (let i = 0; i < specGlobalData.length; i++) {
if (specGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return specGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryComboBoxSpec");
inInfo.set("blockId", "invent_spec_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}],
loadComplete: function (grid) {
},
......@@ -96,18 +64,49 @@ $(function() {
* 页面加载时执行
*/
$(window).load(function () {
// 仓库名称
//initWh()
// 存货名称
//initInvent()
// 规格
//initSpec()
// 查询
query();
//存货编号
initInventCode();
});
/**
* 提交
* @param id
* @param status
*/
function updateSubmitStatus(id) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
JSUtils.confirm("确定提交此库存盘点单吗? ", {
ok: function () {
EiCommunicator.send('HGKC005', 'updateSubmitStatus', inEiInfo, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}
);
}
});
}
/**
* 存货编号
......@@ -135,56 +134,7 @@ let initInventCode = function () {
}
/**
* 初始化仓库
*/
let initWh = function () {
let inInfo = new EiInfo();
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
}
/**
* 初始化存货
*/
let initInvent = function () {
let inInfo = new EiInfo();
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ005", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
}
/**
* 初始化规格
*/
let initSpec = function () {
let inInfo = new EiInfo();
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ005", "queryComboBoxAll", inInfo, {
onSuccess: function (ei) {
specGlobalData = ei.getBlock("invent_all_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
}
/**
* 查询
......
......@@ -54,6 +54,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="100" enable="false" readonly="false"/>
<EF:EFColumn ename="checkNo" cname="盘点单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
......@@ -89,6 +90,9 @@
align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" />
<EF:EFColumn ename="oldCheckNo" cname="原盘点单号" enable="false" hidden="true" width="140" align="center"/>
<EF:EFComboColumn cname="提交状态" ename="submitStatus" width="90" align="center" required="false">
<EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFComboColumn>
</EF:EFGrid>
<br/>
<span style='color: red;font-size: 13px;'>说明:差异数量=实物数量-账面数量;差异重量=实物重量-账面重量</span>
......
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