Commit 97c98d21 by liuyang

1.生产驾驶舱查询工序逻辑调整

2.设备台账保养日期隐藏
3.库存盘点提交bug修复
parent 55530798
...@@ -326,6 +326,9 @@ public class ServiceHGKC005 extends ServiceEPBase { ...@@ -326,6 +326,9 @@ public class ServiceHGKC005 extends ServiceEPBase {
hgkc007.setSource(InventorySource.INVENTORY.getCode()); hgkc007.setSource(InventorySource.INVENTORY.getCode());
hgkc007.setSubmitStatus(HGConstant.ProductStatus.WTJ); hgkc007.setSubmitStatus(HGConstant.ProductStatus.WTJ);
hgkc007.setSourceCode(hgkc005.getCheckNo()); hgkc007.setSourceCode(hgkc005.getCheckNo());
AssertUtils.isTrue(Objects.isNull(hgkc007.getSource()) || hgkc007.getSource() <= 0, "其它出库单数据来源不能为空!");
AssertUtils.isTrue(StringUtils.isBlank(hgkc007.getWhCode()), "其它出库单仓库不能为空!");
DaoUtils.insert(HGKC007.INSERT, hgkc007);
//明细数据处理 //明细数据处理
HGKC007A hgkc007A = new HGKC007A(); HGKC007A hgkc007A = new HGKC007A();
hgkc007A.setPrimaryId(hgkc007.getId()); hgkc007A.setPrimaryId(hgkc007.getId());
...@@ -342,16 +345,17 @@ public class ServiceHGKC005 extends ServiceEPBase { ...@@ -342,16 +345,17 @@ public class ServiceHGKC005 extends ServiceEPBase {
//其他出库单的数量为正数 //其他出库单的数量为正数
hgkc007A.setInvQty(hgkc005.getDiffAmount().negate()); hgkc007A.setInvQty(hgkc005.getDiffAmount().negate());
hgkc007A.setInvUnitWeight(hgkc005.getBookUnitWeight()); hgkc007A.setInvUnitWeight(hgkc005.getBookUnitWeight());
hgkc007A.setInvWeight(hgkc005.getDiffWeight()); hgkc007A.setInvWeight(hgkc005.getDiffWeight().negate());
hgkc007A.setPrdtLength(hgpz005.getLength()); hgkc007A.setPrdtLength(hgpz005.getLength());
hgkc007A.setPrdtWidth(hgpz005.getWidth()); hgkc007A.setPrdtWidth(hgpz005.getWidth());
hgkc007A.setPrdtThick(hgpz005.getThick()); hgkc007A.setPrdtThick(hgpz005.getThick());
hgkc007A.setPrdtSpec(hgpz005.getSpec()); hgkc007A.setPrdtSpec(hgpz005.getSpec());
hgkc007A.setSource(InventorySource.INVENTORY.getCode()); hgkc007A.setSource(InventorySource.INVENTORY.getCode());
hgkc007A.setInventTypeDetail(hgpz005.getInventTypeDetail()); hgkc007A.setInventTypeDetail(hgpz005.getInventTypeDetail());
HGKCTools.HgKc007A.checkData(hgkc007A);
hgkc007.getDetailList().add(hgkc007A); DaoUtils.insert(HGKC007A.INSERT, hgkc007A);
HGKCTools.HgKc007.generateHgkc007(hgkc007); //hgkc007.getDetailList().add(hgkc007A);
//HGKCTools.HgKc007.generateHgkc007(hgkc007);
} }
//如果差异数量大于0则为盘盈,生成入库单 //如果差异数量大于0则为盘盈,生成入库单
if(hgkc005.getDiffAmount().compareTo(BigDecimal.ZERO) > 0){ if(hgkc005.getDiffAmount().compareTo(BigDecimal.ZERO) > 0){
......
...@@ -941,6 +941,15 @@ public class HGKCTools { ...@@ -941,6 +941,15 @@ public class HGKCTools {
} }
return results; return results;
} }
public static void checkData(HGKC007A hgkc007a) {
AssertUtils.isTrue(StringUtils.isBlank(hgkc007a.getWhCode()), "其它出库单明细仓库不能为空!");
AssertUtils.isTrue(StringUtils.isBlank(hgkc007a.getInventCode()), "其它出库单明细存货编码不能为空!");
AssertUtils.isTrue(StringUtils.isBlank(hgkc007a.getInventName()), "其它出库单明细存货名称不能为空!");
AssertUtils.isTrue(hgkc007a.getInvQty().compareTo(BigDecimal.ZERO) <= 0, "其它出库单明细数量不能小于等于0!");
AssertUtils.isTrue(hgkc007a.getInvUnitWeight().compareTo(BigDecimal.ZERO) <= 0, "其它出库单明细单重小于等于0!");
AssertUtils.isTrue(hgkc007a.getInvWeight().compareTo(BigDecimal.ZERO) <= 0, "其它出库单明细总重小于等于0!");
}
} }
/** /**
......
...@@ -1018,9 +1018,9 @@ ...@@ -1018,9 +1018,9 @@
select select
a.factoryCode , a.factoryCode ,
a.factoryName , a.factoryName ,
ROUND(ifnull(sum(a.dayWt),0)/1000, 4) as dayWeight, ROUND(ifnull(sum(a.dayWt),0)/1000, 2) as dayWeight,
ROUND(ifnull(sum(a.monthWt),0)/1000, 4) as monthWeight, ROUND(ifnull(sum(a.monthWt),0)/1000, 2) as monthWeight,
ROUND(ifnull(sum(a.yearWt),0)/1000, 4) as yearWeight ROUND(ifnull(sum(a.yearWt),0)/1000, 2) as yearWeight
from ( from (
select select
h2.factory_code as factoryCode , h2.factory_code as factoryCode ,
...@@ -1078,7 +1078,7 @@ ...@@ -1078,7 +1078,7 @@
h2.factory_name as "factoryName", h2.factory_name as "factoryName",
h2.process_code as "processCode", h2.process_code as "processCode",
h2.process_name as "processName", h2.process_name as "processName",
ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 4) "totalWeight" ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 2) "totalWeight"
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1' where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include refid="appCondition"/> <include refid="appCondition"/>
...@@ -1098,7 +1098,7 @@ ...@@ -1098,7 +1098,7 @@
h2.factory_name as "factoryName", h2.factory_name as "factoryName",
h2.process_code as "processCode", h2.process_code as "processCode",
h2.process_name as "processName", h2.process_name as "processName",
ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 4) "totalWeight" ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 2) "totalWeight"
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1' where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include refid="appCondition"/> <include refid="appCondition"/>
...@@ -1118,7 +1118,7 @@ ...@@ -1118,7 +1118,7 @@
h2.factory_name as "factoryName", h2.factory_name as "factoryName",
h2.process_code as "processCode", h2.process_code as "processCode",
h2.process_name as "processName", h2.process_name as "processName",
ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 4) "totalWeight" ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 2) "totalWeight"
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1' where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include refid="appCondition"/> <include refid="appCondition"/>
...@@ -1136,8 +1136,8 @@ ...@@ -1136,8 +1136,8 @@
a.proj_code as projCode, a.proj_code as projCode,
a.proj_name as projName, a.proj_name as projName,
a.finish_date as completeDate, a.finish_date as completeDate,
ROUND(ifnull(sum(a.total_weight),0)/1000, 4) as totalWeight, ROUND(ifnull(sum(a.total_weight),0)/1000, 2) as totalWeight,
ROUND(ifnull(sum(a.finish_weight),0)/1000, 4) as finishWeight, ROUND(ifnull(sum(a.finish_weight),0)/1000, 2) as finishWeight,
ifnull(sum(a.finish_weight),0) / ifnull(sum(a.total_weight),0) * 100 as schedule, ifnull(sum(a.finish_weight),0) / ifnull(sum(a.total_weight),0) * 100 as schedule,
a.updated_time as updatedTime a.updated_time as updatedTime
from ( from (
...@@ -1236,10 +1236,10 @@ ...@@ -1236,10 +1236,10 @@
<!--工序日产量--> <!--工序日产量-->
<select id="queryByWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryByWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select select
A.process_code as "processCode",
A.process_name as "processName", A.process_name as "processName",
ROUND(ifnull(SUM(B.INV_WEIGHT),0)/1000, 4) "totalWeight" ROUND(ifnull(SUM(B.INV_WEIGHT),0)/1000, 2) "totalWeight"
from ${hggpSchema}.HGGY001 A from ${hggpSchema}.HGGY001 A
join ${platSchema}.TXSOG01 C on A.FACTORY_CODE = C.COMPANY_CODE
left join ( left join (
select select
h2.process_code , h2.process_code ,
...@@ -1259,20 +1259,25 @@ ...@@ -1259,20 +1259,25 @@
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode# A.account_code = #accountCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName"> <isNotEmpty property="factoryCode">
C.factory_name = #factoryName# <isEqual prepend=" AND " property="accountCode" compareValue="Q24072514">
A.factory_code = 'R24072606'
</isEqual>
<isNotEqual prepend=" AND " property="accountCode" compareValue="Q24072514">
A.factory_code = (select distinct COMPANY_CODE from ${platSchema}.TXSOG01 where FACTORY_CODE = #factoryCode#)
</isNotEqual>
</isNotEmpty> </isNotEmpty>
group by group by
A.process_name A.process_code, A.process_name
</select> </select>
<!--工序累计产量--> <!--工序累计产量-->
<select id="queryBySunWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryBySunWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select select
A.SORT as "sort", A.SORT as "sort",
A.process_code as "processCode",
A.process_name as "processName", A.process_name as "processName",
ROUND(ifnull(SUM(B.INV_WEIGHT),0)/1000, 4) "totalWeight" ROUND(ifnull(SUM(B.INV_WEIGHT),0)/1000, 2) "totalWeight"
from ${hggpSchema}.HGGY001 A from ${hggpSchema}.HGGY001 A
join ${platSchema}.TXSOG01 C on A.FACTORY_CODE = C.COMPANY_CODE
left join ( left join (
select select
h.COMPANY_CODE, h.COMPANY_CODE,
...@@ -1280,30 +1285,31 @@ ...@@ -1280,30 +1285,31 @@
ROUND(ifnull(SUM(h.INV_WEIGHT), 0)/ 1000, 4) "INV_WEIGHT" ROUND(ifnull(SUM(h.INV_WEIGHT), 0)/ 1000, 4) "INV_WEIGHT"
from ${hggpSchema}.hgkc003 h from ${hggpSchema}.hgkc003 h
inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 where h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include refid="appCondition"/> <include refid="appCondition"/>
<include refid="appOrderCondition"/> <include refid="appOrderCondition"/>
<isNotEmpty prepend=" AND " property="depositDate"> <isNotEmpty prepend=" AND " property="depositDate">
left(h.DEPOSIT_DATE,6) = left(#depositDate#,6) left(h.DEPOSIT_DATE,6) = left(#depositDate#,6)
</isNotEmpty> </isNotEmpty>
group by h.COMPANY_CODE, h2.process_code group by h.COMPANY_CODE, h2.process_code
) B on A.FACTORY_CODE = B.COMPANY_CODE AND A.process_code = B.process_code ) B on A.process_code = B.process_code
where 1=1 and DELETE_FLAG = '0' and reveal = 1 where DELETE_FLAG = '0' and reveal = 1
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode# A.account_code = #accountCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="processNames"> <isNotEmpty prepend=" AND " property="processNames">
A.process_name IN <iterate close=")" open="(" conjunction="," property="processNames">#processNames[]#</iterate> A.process_name IN <iterate close=")" open="(" conjunction="," property="processNames">#processNames[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode"> <isNotEmpty property="factoryCode">
C.factory_code = #factoryCode# <isEqual prepend=" AND " property="accountCode" compareValue="Q24072514">
</isNotEmpty> A.factory_code = 'R24072606'
<isNotEmpty prepend=" AND " property="factoryName"> </isEqual>
C.factory_name = #factoryName# <isNotEqual prepend=" AND " property="accountCode" compareValue="Q24072514">
A.factory_code = (select distinct COMPANY_CODE from ${platSchema}.TXSOG01 where FACTORY_CODE = #factoryCode#)
</isNotEqual>
</isNotEmpty> </isNotEmpty>
group by group by
A.SORT, A.process_name A.SORT, A.process_code, A.process_name
order by A.SORT order by A.SORT
</select> </select>
<!--日期到条件7天日产量--> <!--日期到条件7天日产量-->
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
displayType="0" sort="true" align="right" maxLength="15" required="true" displayType="0" sort="true" align="right" maxLength="15" required="true"
data-regex="/^-?[0-9]{1,15}?$/" data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="maintainDate" cname="保养日期" width="120" align="center" editType="date" <EF:EFColumn ename="maintainDate" cname="保养日期" width="120" align="center" editType="date" hidden="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/>
<EF:EFComboColumn ename="deviceUserId" cname="设备负责人" defaultValue="${loginName}" <EF:EFComboColumn ename="deviceUserId" cname="设备负责人" defaultValue="${loginName}"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
......
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