Commit 2458165b by liuyang

2024-07-19 采购收货添加是否开票字段和功能

parent 2c0e7d04
......@@ -61,6 +61,7 @@ public class HGCG003 extends DaoEPBase {
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String FIELD_IS_INVOICING = "isInvoicing"; /*是否开票 0否 1是*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -146,6 +147,7 @@ public class HGCG003 extends DaoEPBase {
private BigDecimal price = new BigDecimal(0.000); /* 单价*/
private BigDecimal amount = new BigDecimal(0.000); /* 金额*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
private Integer isInvoicing = 0;
/**
* initialize the metadata.
......@@ -339,6 +341,10 @@ public class HGCG003 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_IS_INVOICING);
eiColumn.setDescName("是否开票");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -949,6 +955,14 @@ public class HGCG003 extends DaoEPBase {
this.inventTypeDetail = inventTypeDetail;
}
public Integer getIsInvoicing() {
return isInvoicing;
}
public void setIsInvoicing(Integer isInvoicing) {
this.isInvoicing = isInvoicing;
}
/**
* get the value from Map.
*
......@@ -996,6 +1010,7 @@ public class HGCG003 extends DaoEPBase {
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setIsInvoicing(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_INVOICING)), isInvoicing));
}
/**
......@@ -1044,6 +1059,7 @@ public class HGCG003 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_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_IS_INVOICING,StringUtils.toString(isInvoicing, eiMetadata.getMeta(FIELD_IS_INVOICING)));
return map;
}
......
......@@ -41,7 +41,8 @@
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
STATUS as "status", <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" <!-- 存货类型明细 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型明细 -->
IS_INVOICING as "isInvoicing"
</sql>
<sql id="condition">
......@@ -115,6 +116,9 @@
<isNotEmpty prepend=" AND " property="signingDateTo">
RECEIVE_DATE &lt;= #signingDateTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isInvoicing">
IS_INVOICING = #isInvoicing#
</isNotEmpty>
</sql>
<sql id="idCondition">
......@@ -199,14 +203,15 @@
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
STATUS, <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
INVENT_TYPE_DETAIL
INVENT_TYPE_DETAIL,
IS_INVOICING
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiveDate#, #receiveNo#,
#planNo#, #contractNo#, #supCode#, #supName#, #purUserId#, #purUserName#,
#inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #receiveQty#, #receiveUnitWeight#,
#receiveWeight#,#price#, #amount#, #status#,#inventTypeDetail#
#receiveWeight#,#price#, #amount#, #status#,#inventTypeDetail#,#isInvoicing#
)
</insert>
......@@ -256,4 +261,13 @@
WHERE RECEIVE_NO = #receiveNo#
</update>
<!-- 修改开票 -->
<update id="updateIsInvoicing">
UPDATE ${hggpSchema}.HGCG003
SET
IS_INVOICING = #isInvoicing#,
<include refid="updateRevise"/>
WHERE RECEIVE_NO = #receiveNo#
</update>
</sqlMap>
......@@ -259,6 +259,21 @@ public class HGCGTools {
}
/**
* 修改是否开票
*
* @param receiveNo
* @param isInvoicing
*/
public static void updateIsInvoicing(String receiveNo, Integer isInvoicing) {
AssertUtils.isEmpty(receiveNo, "收货单号不能为空!");
AssertUtils.isNull(isInvoicing, "是否开票不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("receiveNo", receiveNo);
paramMap.put("isInvoicing", isInvoicing);
DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_IS_INVOICING, paramMap);
}
/**
* 修改状态
*
* @param zl001
......
......@@ -196,6 +196,17 @@ public class HGConstant {
}
/**
* 采购收货是否开票
*/
public static class CgIsInvoicing {
// 否
public static final Integer S_0 = 0;
// 是
public static final Integer S_1 = 1;
}
/**
* 库存类型
*
* @author:songx
......
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