Commit 35eaf549 by 江和松

生产入库新增是否退回字段,退回了不能重复退回

parent fe8797da
......@@ -70,7 +70,9 @@ public class HGKC003 extends DaoEPBase {
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 FIELD_STORAGE_TYPE = "storageType"; /* 入库类型:1:入库 2:退回*/
public static final String FIELD_IS_RETURN = "isReturn"; /* 是否退回*/
public static final String COL_ID = "ID";
public static final String COL_QUALITY_ID = "QUALITY_ID"; /* 质检单ID*/
......@@ -119,7 +121,8 @@ public class HGKC003 extends DaoEPBase {
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 COL_STORAGE_TYPE = "STORAGE_TYPE"; /* 入库类型:1:入库 2:退回*/
public static final String COL_IS_RETURN = "IS_RETURN"; /* 是否退回*/
public static final String QUERY = "HGKC003.query";
public static final String COUNT = "HGKC003.count";
......@@ -177,7 +180,8 @@ public class HGKC003 extends DaoEPBase {
private BigDecimal partCoefficient = new BigDecimal(0.000); /* 零件-系数*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private Integer storageType; /* 入库类型:0:入库 1:退回*/
private Integer storageType; /* 入库类型:1:入库 2:退回*/
private Integer isReturn; /* 是否退回:0:否 1:是*/
/**
* initialize the metadata.
......@@ -411,10 +415,12 @@ public class HGKC003 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STORAGE_TYPE);
eiColumn.setDescName("入库类型:0:入库 1:退回");
eiColumn.setDescName("入库类型:1:入库 2:退回");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_IS_RETURN);
eiColumn.setDescName("是否退回:0:否 1:是");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -1129,6 +1135,14 @@ public class HGKC003 extends DaoEPBase {
this.storageType = storageType;
}
public Integer getIsReturn() {
return isReturn;
}
public void setIsReturn(Integer isReturn) {
this.isReturn = isReturn;
}
/**
* get the value from Map.
*
......@@ -1185,6 +1199,7 @@ public class HGKC003 extends DaoEPBase {
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setStorageType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STORAGE_TYPE)), storageType));
setIsReturn(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_RETURN)), isReturn));
}
/**
......@@ -1242,6 +1257,7 @@ public class HGKC003 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_IS_RETURN, StringUtils.toString(isReturn, eiMetadata.getMeta(FIELD_IS_RETURN)));
return map;
}
......
......@@ -65,7 +65,7 @@ public class HGKC003A extends DaoEPBase {
public static final String FIELD_PRIMARY_ID = "primaryId"; /* 主表id*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_STORAGE_TYPE = "storageType"; /* 入库类型:0:入库 1:退回*/
public static final String FIELD_STORAGE_TYPE = "storageType"; /* 入库类型:1:入库 2:退回*/
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*/
......@@ -115,7 +115,7 @@ public class HGKC003A extends DaoEPBase {
public static final String COL_PRIMARY_ID = "PRIMARY_ID"; /* 主表id*/
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 COL_STORAGE_TYPE = "STORAGE_TYPE"; /* 入库类型:1:入库 2:退回*/
public static final String COL_PART_SPEC_ID = "PART_SPEC_ID"; /* 零件规格ID*/
public static final String COL_RECTIFICATION_ID = "RECTIFICATION_ID"; /* 整改通知单ID*/
......@@ -172,7 +172,7 @@ public class HGKC003A extends DaoEPBase {
private Long primaryId = new Long(0); /* 主表id*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private Boolean storageType; /* 入库类型:0:入库 1:退回*/
private Boolean storageType; /* 入库类型:1:入库 2:退回*/
private Long partSpecId = new Long(0); /* 规格id*/
private Long rectificationId = new Long(0); /* 整改通知单id*/
......@@ -396,7 +396,7 @@ public class HGKC003A extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STORAGE_TYPE);
eiColumn.setDescName("入库类型:0:入库 1:退回");
eiColumn.setDescName("入库类型:1:入库 2:退回");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_SPEC_ID);
......@@ -1113,7 +1113,7 @@ public class HGKC003A extends DaoEPBase {
this.amount = amount;
}
/**
* get the storageType - 入库类型:0:入库 1:退回.
* get the storageType - 入库类型:1:入库 2:退回.
* @return the storageType
*/
public Boolean getStorageType() {
......@@ -1121,9 +1121,9 @@ public class HGKC003A extends DaoEPBase {
}
/**
* set the storageType - 入库类型:0:入库 1:退回.
* set the storageType - 入库类型:1:入库 2:退回.
*
* @param storageType - 入库类型:0:入库 1:退回
* @param storageType - 入库类型:1:入库 2:退回
*/
public void setStorageType(Boolean storageType) {
this.storageType = storageType;
......
......@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.constant.HGConstant;
......@@ -217,6 +218,7 @@ public class ServiceHGKC003 extends ServiceBase {
newKc003.setDepositNoOld(fKc003.getDepositNo());
newKc003.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_DEPOSIT_NO));
newKc003.setStorageType(HGConstant.StorageType.TH);
newKc003.setIsReturn(CommonConstant.YesNo.YES_1);
DaoUtils.insert(HGKC003.INSERT, newKc003);
// 修改库存
HGKCUtils.HgKc010.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getPartSpecId(),
......
......@@ -147,6 +147,9 @@
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isReturn">
IS_RETURN = #isReturn#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -198,7 +201,8 @@
PART_SPEC as "partSpec", <!-- 零件规格 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
STORAGE_TYPE as "storageType", <!-- 入库类型:0:入库 1:退回 -->
STORAGE_TYPE as "storageType", <!-- 入库类型:1:入库 2:退回 -->
IS_RETURN as "isReturn", <!-- 是否退回:0:否 1:是 -->
SUBMIT_STATUS as "submitStatus" <!-- 提交状态 -->
FROM ${hggpSchema}.HGKC003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" />
......@@ -266,7 +270,8 @@
PART_SPEC, <!-- 零件规格 -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
STORAGE_TYPE, <!-- 入库类型:0:入库 1:退回 -->
STORAGE_TYPE, <!-- 入库类型:1:入库 2:退回 -->
IS_RETURN, <!-- 是否退回:0:否 1:是 -->
SUBMIT_STATUS
)
VALUES (#qualityId#,#partSpecId#,#rectificationId#,#partCoefficient#,#accountCode#,
......@@ -277,7 +282,7 @@
#factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#,
#prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#,
#prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#,
#partThick#, #partSpec#, #price#, #amount#, #storageType#,#submitStatus#)
#partThick#, #partSpec#, #price#, #amount#, #storageType#, #isReturn#,#submitStatus#)
</insert>
<delete id="delete">
......@@ -337,7 +342,8 @@
PART_SPEC = #partSpec#, <!-- 零件规格 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
STORAGE_TYPE = #storageType#, <!-- 入库类型:0:入库 1:退回 -->
STORAGE_TYPE = #storageType#, <!-- 入库类型:1:入库 2:退回 -->
IS_RETURN = #isReturn#, <!-- 是否退回:0:否 1:是 -->
SUBMIT_STATUS = #submitStatus# <!-- 提交状态 -->
WHERE
ID = #id#
......
......@@ -199,7 +199,7 @@
PRIMARY_ID as "primaryId", <!-- 主表id -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
STORAGE_TYPE as "storageType" <!-- 入库类型:0:入库 1:退回 -->
STORAGE_TYPE as "storageType" <!-- 入库类型:1:入库 2:退回 -->
FROM ${hggpSchema}.HGKC003A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -267,7 +267,7 @@
PRIMARY_ID, <!-- 主表id -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
STORAGE_TYPE <!-- 入库类型:0:入库 1:退回 -->
STORAGE_TYPE <!-- 入库类型:1:入库 2:退回 -->
)
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>
......@@ -331,7 +331,7 @@
PRIMARY_ID = #primaryId#, <!-- 主表id -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
STORAGE_TYPE = #storageType# <!-- 入库类型:0:入库 1:退回 -->
STORAGE_TYPE = #storageType# <!-- 入库类型:1:入库 2:退回 -->
WHERE
ID = #id#
</update>
......
......@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.kc.tools;
import cn.hutool.core.collection.CollectionUtil;
import com.baosight.hggp.common.CheckTypeEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
......@@ -255,6 +256,7 @@ public class HGKCTools {
hgkc003.setPartThick(hgpz005.getThick());
hgkc003.setDepositDate(DateUtils.shortDate());
hgkc003.setStorageType(HGConstant.StorageType.RK);
hgkc003.setIsReturn(CommonConstant.YesNo.NO_0);
hgkc003.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
hgkc003List.add(hgkc003);
}
......
......@@ -13,11 +13,14 @@ $(function () {
title: "操作",
template: function (item) {
let status = item.submitStatus;
let isReturn = item.isReturn;
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>';
}
if (status == 1 && isReturn == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="sendBack(' + item.id + ')" >退回</a>';
}
......
......@@ -27,7 +27,7 @@
<EF:EFColumn ename="rectificationId" cname="整改通知单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="partSpecId" cname="零件规格ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFComboColumn cname="入库类型" ename="storageType" width="90" align="center" required="false">
<EF:EFComboColumn cname="入库类型" ename="storageType" width="90" align="center" required="false" enable="false" readonly="false" >
<EF:EFCodeOption codeName="hggp.kc.storageType" />
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="140" align="center"/>
......
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