Commit 30327607 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents 8f45981c 36762c5d
......@@ -97,6 +97,8 @@ public class HGCB005 extends DaoEPBase {
public static final String INSERT = "HGCB005.insert";
public static final String UPDATE = "HGCB005.update";
public static final String DELETE = "HGCB005.delete";
public static final String DELETE_BY_CONDITION = "HGCB005.delete_by_condition";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
......@@ -133,6 +135,25 @@ public class HGCB005 extends DaoEPBase {
private String processName = " "; /* 工序名称*/
private Long processOrder = new Long(0); /* 加工顺序*/
private BigDecimal costWeight = new BigDecimal(0);
private BigDecimal costWeightValue = new BigDecimal(0);
public BigDecimal getCostWeight() {
return costWeight;
}
public void setCostWeight(BigDecimal costWeight) {
this.costWeight = costWeight;
}
public BigDecimal getCostWeightValue() {
return costWeightValue;
}
public void setCostWeightValue(BigDecimal costWeightValue) {
this.costWeightValue = costWeightValue;
}
/**
* initialize the metadata.
*/
......
......@@ -350,6 +350,13 @@
id = #id#
</delete>
<delete id="delete_by_condition">
DELETE FROM ${hggpSchema}.HGCB005 WHERE
company_code = #companyCode#, <!-- 公司编码 -->
account_year = #accountYear#, <!-- 会计期(年) -->
account_month = #accountMonth# <!-- 会计期(月) -->
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCB005
SET
......
......@@ -15,14 +15,12 @@ import com.baosight.hggp.hg.cb.domain.HGCB005;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.domain.HGCW001;
import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW012A;
import com.baosight.hggp.hg.cw.domain.HGCW013;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC005A;
......@@ -245,7 +243,7 @@ public class HGCBTools {
hgcb002.setInventCode(hgkc006A.getInventCode());
hgcb002.setInventName(hgkc006A.getInventName());
hgcb002.setInventRecordId(hgkc006A.getInventRecordId());
hgcb002.setSpec(hgkc006A.getPartSpec());
hgcb002.setSpec(hgkc006A.getPrdtSpec());
hgcb002.setIsEstimate(0);
hgcb002.setQuantity(hgkc006A.getInvQty());
hgcb002.setWeight(hgkc006A.getInvWeight());
......@@ -579,8 +577,8 @@ public class HGCBTools {
* @return
*/
public static String buildKey(Map dataMap) {
if (dataMap.containsKey(HGKC006A.FIELD_PART_SPEC)){
dataMap.put(HGCB004.FIELD_SPEC, dataMap.get(HGKC006A.FIELD_PART_SPEC));
if (dataMap.containsKey(HGKC006A.FIELD_PRDT_SPEC)){
dataMap.put(HGCB004.FIELD_SPEC, dataMap.get(HGKC006A.FIELD_PRDT_SPEC));
}else if (dataMap.containsKey(HGKC008A.FIELD_INV_SPEC)){
dataMap.put(HGCB004.FIELD_SPEC, dataMap.get(HGKC008A.FIELD_INV_SPEC));
}else if (dataMap.containsKey(HGKC007A.FIELD_PRDT_SPEC)){
......@@ -620,6 +618,10 @@ public class HGCBTools {
}
public static class THGCB005 {
public static void deleteByCondition(Map params){
DaoBase.getInstance().delete(HGCB005.DELETE_BY_CONDITION, params);
}
/**
* 同步数据
*
......@@ -639,22 +641,73 @@ public class HGCBTools {
//入库单按项目编码、产品编码、存货工序ID、规格、单重分组,分别取正向入库单数量、重量和退回数量
//生成制造成本基础数据
List<HGCB005> hgcb005List = constractHGCB005(hgcw001,hgkc003List);
//通过存货工序ID查询工序权重
List<Long> processIds = Optional.ofNullable(hgcb005List).orElse(new ArrayList<>()).stream().map(HGCB005::getInventProcessId).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(processIds)){
List<HGPZ005> hgpz005List = HGPZTools.HgPz005.getIds(processIds);
Map<Long,HGPZ005> hgpz005Map = Optional.ofNullable(hgpz005List).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(
HGPZ005::getId,
o->o,
(o1,o2)->o1
));
//设置权重
setingCostWeight(hgcb005List);
//计算项目总成本
Map<String,BigDecimal> totalAmoutMap = calculateProjAmout(hgcw001);
//计算产副品成本:权重值*项目总费用=产副品制造总成本;总成本/数量=单位成本
Optional.ofNullable(hgcb005List).orElse(new ArrayList<>()).stream().forEach( o -> {
BigDecimal totalAmout = totalAmoutMap.get(o.getProjCode());
o.setTotalCost(totalAmout.multiply(o.getCostWeightValue()).setScale(6,RoundingMode.HALF_UP));
o.setUnitCost(o.getTotalCost().divide(o.getQuantity(),6,RoundingMode.HALF_UP));
});
//按公司删除当前会计起的成本核算数据
Map cb005DeleteParam = new HashMap();
cb005DeleteParam.put(HGCB005.FIELD_company_code,hgcw001.getCompanyCode());
cb005DeleteParam.put(HGCB005.FIELD_account_year,hgcw001.getAccountYear());
cb005DeleteParam.put(HGCB005.FIELD_account_month,hgcw001.getAccountPeriod().substring(4));
deleteByCondition(cb005DeleteParam);
//保存新的成本核算数据
if(CollectionUtils.isNotEmpty(hgcb005List)){
DaoBase.getInstance().insertBatch(HGCB005.INSERT, hgcb005List);
}
//通过业务账期信息查询类型为分摊的费用归集数据,按项目分组金额求和
//计算成本:入库重量*工序权重=产副品权重,SUM(产副品权重)=项目权重,产副品权重/项目权重*总费用=产副品制造总成本
}
}
private static Map<String,BigDecimal> calculateProjAmout(HGCW001 hgcw001){
//通过业务账期信息查询类型为分摊的费用归集数据,按项目分组金额求和
Map cw052ParamMap = new HashMap();
cw052ParamMap.put(HGCW052.FIELD_COMPANY_CODE,hgcw001.getCompanyCode());
cw052ParamMap.put(HGCW052.FIELD_YEAR,hgcw001.getAccountYear());
cw052ParamMap.put(HGCW052.FIELD_MONTH,hgcw001.getAccountPeriod().substring(4));
cw052ParamMap.put(HGCW052.FIELD_IS_SHARE, CommonConstant.YesNo.YES_1);
List<HGCW052> hgcw052List = HGCWTools.HgCw052.listByCondition(cw052ParamMap);
Map<String,BigDecimal> totalAmoutMap = Optional.ofNullable(hgcw052List).orElse(new ArrayList<>()).stream().collect(Collectors.groupingBy(
o->o.getItemCode(),
Collectors.reducing(
BigDecimal.ZERO,HGCW052::getAmount,BigDecimal::add))
);
return totalAmoutMap;
}
private static void setingCostWeight(List<HGCB005> hgcb005List){
//通过存货工序ID查询工序权重
List<Long> processIds = Optional.ofNullable(hgcb005List).orElse(new ArrayList<>()).stream().map(HGCB005::getInventProcessId).collect(Collectors.toList());
List<HGPZ005A> hgpz005aList = HGPZTools.HgPz005A.queryByIds(processIds);
Map<Long,HGPZ005A> hgpz005aMap = Optional.ofNullable(hgpz005aList).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(
HGPZ005A::getId,
o->o,
(o1,o2)->o1
));
//设置权重,入库重量*工序权重=产副品权重
Optional.ofNullable(hgcb005List).orElse(new ArrayList<>()).stream().forEach(o -> {
HGPZ005A hgpz005a = hgpz005aMap.get(o.getInventProcessId());
AssertUtils.isNull(hgpz005a,String.format("产品[%s]%s工艺工序配置缺失",o.getProductCode(),o.getProductName()));
o.setCostWeight(o.getTotalWeight().multiply(hgpz005a.getCostWeight()).setScale(6,RoundingMode.HALF_UP));
});
//按项目分组求总权重,SUM(产副品权重)=项目权重
Map<String,BigDecimal> totalCostWeightMap = Optional.ofNullable(hgcb005List).orElse(new ArrayList<>()).stream().collect(
Collectors.groupingBy(HGCB005::getProjCode,Collectors.reducing(
BigDecimal.ZERO,HGCB005::getCostWeight,BigDecimal::add)));
//设置权重值 = 产副品权重/项目权重
Optional.ofNullable(hgcb005List).orElse(new ArrayList<>()).stream().forEach(o -> {
BigDecimal projCostWeight = totalCostWeightMap.get(o.getProjCode());
AssertUtils.isTrue(Objects.isNull(projCostWeight)||BigDecimal.ZERO.compareTo(projCostWeight)>=0
,String.format("项目[%s]%s总权重等于或小于0",o.getProjCode(),o.getProjName()));
o.setCostWeightValue(o.getCostWeight().divide(projCostWeight,6,RoundingMode.HALF_UP));
});
}
private static List<HGCB005> constractHGCB005(HGCW001 hgcw001, List<HGKC003> hgkc003List){
List<HGCB005> hgcb005List = Optional.ofNullable(hgkc003List).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(
o->o.getProjCode()+"-"+o.getPrdtCode()+"-"+o.getInventProcessId()+"-"+o.getPrdtSpec()+"-"+o.getInvUnitWeight(),
......
......@@ -809,7 +809,12 @@ public class HGCWTools {
}
}
public static class HgCw052{
public static List<HGCW052> listByCondition(Map param) {
return DaoBase.getInstance().query(HGCW052.QUERY,param);
}
}
public static class HgCw055{
public static void save(List<Map> rows, UserVO userVO) {
// AssertUtils.isNull(contractNumber, "合同号不能为空!");
......
......@@ -336,7 +336,7 @@ public class ServiceHGKC005 extends ServiceEPBase {
//其他出库单的数量为正数
hgkc007A.setInvQty(hgkc005.getDiffAmount().negate());
hgkc007A.setInvUnitWeight(hgkc005.getBookUnitWeight());
hgkc007A.setInvWeight(hgkc005.getDiffWeight().negate());
hgkc007A.setInvWeight(hgkc005.getDiffWeight());
hgkc007A.setPrdtLength(hgpz005.getLength());
hgkc007A.setPrdtWidth(hgpz005.getWidth());
hgkc007A.setPrdtThick(hgpz005.getThick());
......
......@@ -221,7 +221,7 @@ public class ServiceHGKC009 extends ServiceBase {
// 1.3、其他入库
HGKC006A qtRk = qtRkMap.get(key);
kc009.setQtEnterAmount(qtRk == null ? BigDecimal.ZERO : qtRk.getInvQty());
kc009.setQtEnterWeight(qtRk == null ? BigDecimal.ZERO : qtRk.getPartWidth());
kc009.setQtEnterWeight(qtRk == null ? BigDecimal.ZERO : qtRk.getPrdtWidth());
// 1.4、入库
kc009.setEnterAmount(kc009.getCgEnterAmount().add(kc009.getScEnterAmount())
.add(kc009.getQtEnterAmount()));
......
......@@ -73,48 +73,6 @@
<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>
......@@ -152,20 +110,6 @@
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", <!-- 提交状态 -->
SOURCE_CODE as "sourceCode", <!-- 数据来源编号 -->
SOURCE as "source" <!-- 数据来源 -->
......@@ -219,25 +163,11 @@
PROD_TASK_NO, <!-- 生产任务号 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRDT_TYPE, <!-- 产品类型 -->
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
PRDT_LENGTH, <!-- 产品-长 -->
PRDT_WIDTH, <!-- 产品-宽 -->
PRDT_THICK, <!-- 产品-厚 -->
PRDT_SPEC, <!-- 产品规格 -->
PART_TYPE, <!-- 零件类型 -->
PART_CODE, <!-- 零件编码 -->
PART_NAME, <!-- 零件名称 -->
PART_LENGTH, <!-- 零件-长 -->
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
SUBMIT_STATUS, <!-- 提交状态 -->
SOURCE_CODE, <!-- 数据来源编号 -->
SOURCE <!-- 数据来源 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherEnterDate#, #otherEnterNo#, #whCode#, #whName#, #otherEnterNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #submitStatus#, #sourceCode#, #source#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherEnterDate#, #otherEnterNo#, #whCode#, #whName#, #otherEnterNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #submitStatus#, #sourceCode#, #source#)
</insert>
......@@ -267,20 +197,6 @@
PROD_TASK_NO = #prodTaskNo#, <!-- 生产任务号 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_LENGTH = #prdtLength#, <!-- 产品-长 -->
PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
PART_TYPE = #partType#, <!-- 零件类型 -->
PART_CODE = #partCode#, <!-- 零件编码 -->
PART_NAME = #partName#, <!-- 零件名称 -->
PART_LENGTH = #partLength#, <!-- 零件-长 -->
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
SUBMIT_STATUS = #submitStatus#, <!-- 提交状态 -->
SOURCE_CODE = #sourceCode#, <!-- 提交状态 -->
SOURCE = #source# <!-- 数据来源 -->
......@@ -314,20 +230,6 @@
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", <!-- 提交状态 -->
SOURCE_CODE as "sourceCode", <!-- 数据来源编号 -->
SOURCE as "source" <!-- 数据来源 -->
......@@ -405,20 +307,6 @@
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", <!-- 提交状态 -->
SOURCE_CODE as "sourceCode", <!-- 数据来源编号 -->
SOURCE as "source" <!-- 数据来源 -->
......
......@@ -114,32 +114,8 @@
<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="partCoefficient">
PART_COEFFICIENT = #partCoefficient#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpecId">
PART_SPEC_ID = #partSpecId#
<isNotEmpty prepend=" AND " property="prdtCoefficient">
PRDT_COEFFICIENT = #prdtCoefficient#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="primaryId">
PRIMARY_ID = #primaryId#
......@@ -201,15 +177,7 @@
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_COEFFICIENT as "partCoefficient", <!-- 零件-系数 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
PART_SPEC_ID as "partSpecId", <!-- 零件规格id -->
PRDT_COEFFICIENT as "prdtCoefficient", <!-- 产品-系数 -->
PRIMARY_ID as "primaryId", <!-- 主表id -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
......@@ -272,22 +240,14 @@
PRDT_WIDTH, <!-- 产品-宽 -->
PRDT_THICK, <!-- 产品-厚 -->
PRDT_SPEC, <!-- 产品规格 -->
PART_TYPE, <!-- 零件类型 -->
PART_CODE, <!-- 零件编码 -->
PART_NAME, <!-- 零件名称 -->
PART_LENGTH, <!-- 零件-长 -->
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_COEFFICIENT, <!-- 零件系数 -->
PART_SPEC, <!-- 零件规格 -->
PART_SPEC_ID, <!-- 零件规格id -->
PRDT_COEFFICIENT, <!-- 产品系数 -->
PRIMARY_ID, <!-- 主表id -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
SOURCE, <!-- 数据来源 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherEnterDate#, #otherEnterNo#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invQty#, #invUnitWeight#, #invWeight#, #otherEnterNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partCoefficient#, #partSpec#,#partSpecId#, #primaryId#, #price#, #amount#, #source#,#inventTypeDetail#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherEnterDate#, #otherEnterNo#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invQty#, #invUnitWeight#, #invWeight#, #otherEnterNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #prdtCoefficient#, #primaryId#, #price#, #amount#, #source#,#inventTypeDetail#)
</insert>
<delete id="delete">
......@@ -333,15 +293,7 @@
PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
PART_TYPE = #partType#, <!-- 零件类型 -->
PART_CODE = #partCode#, <!-- 零件编码 -->
PART_NAME = #partName#, <!-- 零件名称 -->
PART_LENGTH = #partLength#, <!-- 零件-长 -->
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_COEFFICIENT = #partCoefficient#, <!-- 零件-系数 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
PART_SPEC_ID = #partSpecId#, <!-- 零件规格id -->
PRDT_COEFFICIENT = #prdtCoefficient#, <!-- 产品-系数 -->
PRIMARY_ID = #primaryId#, <!-- 主表id -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
......@@ -402,15 +354,7 @@
A.PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
A.PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
A.PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
A.PART_TYPE as "partType", <!-- 零件类型 -->
A.PART_CODE as "partCode", <!-- 零件编码 -->
A.PART_NAME as "partName", <!-- 零件名称 -->
A.PART_LENGTH as "partLength", <!-- 零件-长 -->
A.PART_WIDTH as "partWidth", <!-- 零件-宽 -->
A.PART_THICK as "partThick", <!-- 零件-厚 -->
A.PART_COEFFICIENT as "partCoefficient", <!-- 零件-系数 -->
A.PART_SPEC as "partSpec", <!-- 零件规格 -->
A.PART_SPEC_ID as "partSpecId", <!-- 零件规格id -->
A.PRDT_COEFFICIENT as "prdtCoefficient", <!-- 产品-系数 -->
A.PRIMARY_ID as "primaryId", <!-- 主表id -->
A.PRICE as "price", <!-- 单价 -->
A.AMOUNT as "amount", <!-- 金额 -->
......
......@@ -55,7 +55,7 @@
<EF:EFColumn ename="entityRemark" cname="盘点说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="invUnitWeight" cname="库存单重(KG)" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invUnitWeight" cname="库存单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="库存重量(KG)" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150" hidden="true"/>
......
......@@ -51,6 +51,7 @@
<EF:EFColumn ename="prdtLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="prdtWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="prdtThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="prdtCoefficient" cname="系数" enable="false" width="80" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
......
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