Commit 575853ed by liuyang

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

parents 30498842 e0912831
...@@ -21,7 +21,7 @@ public class CutterbarWarning { ...@@ -21,7 +21,7 @@ public class CutterbarWarning {
private String errorCode; private String errorCode;
/** /**
* 异常登记 * 异常等级
*/ */
private String prio; private String prio;
......
...@@ -125,13 +125,15 @@ public class ServiceHPKC004 extends ServiceBase { ...@@ -125,13 +125,15 @@ public class ServiceHPKC004 extends ServiceBase {
newKc004.setDeleteFlag(CommonConstant.YesNo.YES_1); newKc004.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.insert(HPKC004.INSERT, newKc004); DaoUtils.insert(HPKC004.INSERT, newKc004);
// 修改库存 // 修改库存
if (hpkc010!=null) if (hpkc010!=null) {
HPKCTools.updateStock(dbKc004.getWhCode(), hpkc010.getInventRecordId(), HPKCTools.updateStock(dbKc004.getWhCode(), hpkc010.getInventRecordId(),
dbKc004.getAmount(), dbKc004.getWeight().multiply(new BigDecimal(1000)),hpkc010.getFactoryCode()); dbKc004.getAmount(), dbKc004.getWeight(),hpkc010.getFactoryCode());
else } else {
HPKCTools.updateProdStock(dbKc004.getWhCode(), dbKc004.getProdNo(), HPKCTools.updateProdStock(dbKc004.getWhCode(), dbKc004.getProdNo(),
dbKc004.getAmount(), dbKc004.getWeight(),hpkc011.getFactoryCode()); dbKc004.getAmount(), dbKc004.getWeight(),hpkc011.getFactoryCode());
} }
}
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
......
...@@ -93,7 +93,7 @@ public class ServiceHPKC013 extends ServiceBase { ...@@ -93,7 +93,7 @@ public class ServiceHPKC013 extends ServiceBase {
HPKC013 fKc013 = new HPKC013(); HPKC013 fKc013 = new HPKC013();
fKc013.fromMap(resultRows.get(i)); fKc013.fromMap(resultRows.get(i));
HPKC013 dbKc013 = mapKc013.get(fKc013.getReturnNo()); HPKC013 dbKc013 = mapKc013.get(fKc013.getReturnNo());
if (!fKc013.getSubInventCode().equals(" ")) { if (!dbKc013.getSubInventCode().equals(" ")) {
hpkc011 = HPKCTools.HpKc011.listById(dbKc013.getKcId()); hpkc011 = HPKCTools.HpKc011.listById(dbKc013.getKcId());
}else { }else {
hpkc010 = HPKCTools.HpKc010.listById(dbKc013.getKcId()); hpkc010 = HPKCTools.HpKc010.listById(dbKc013.getKcId());
...@@ -104,7 +104,7 @@ public class ServiceHPKC013 extends ServiceBase { ...@@ -104,7 +104,7 @@ public class ServiceHPKC013 extends ServiceBase {
// 修改库存 // 修改库存
if (hpkc010 != null) { if (hpkc010 != null) {
HPKCTools.updateStock(dbKc013.getWhCode(), hpkc010.getInventRecordId(), HPKCTools.updateStock(dbKc013.getWhCode(), hpkc010.getInventRecordId(),
dbKc013.getAmount(), dbKc013.getWeight().multiply(new BigDecimal(1000)), hpkc010.getFactoryCode()); dbKc013.getAmount(), dbKc013.getWeight(), hpkc010.getFactoryCode());
} else { } else {
HPKCTools.updateProdStock(dbKc013.getWhCode(), dbKc013.getProdNo(), HPKCTools.updateProdStock(dbKc013.getWhCode(), dbKc013.getProdNo(),
dbKc013.getAmount(), dbKc013.getWeight(), hpkc011.getFactoryCode()); dbKc013.getAmount(), dbKc013.getWeight(), hpkc011.getFactoryCode());
...@@ -164,7 +164,7 @@ public class ServiceHPKC013 extends ServiceBase { ...@@ -164,7 +164,7 @@ public class ServiceHPKC013 extends ServiceBase {
// 修改库存 // 修改库存
if (hpkc010 != null) { if (hpkc010 != null) {
HPKCTools.updateStock(dbKc013.getWhCode(), hpkc010.getInventRecordId(), HPKCTools.updateStock(dbKc013.getWhCode(), hpkc010.getInventRecordId(),
newKc013.getAmount(), newKc013.getWeight().multiply(new BigDecimal(1000)), hpkc010.getFactoryCode()); newKc013.getAmount(), newKc013.getWeight(), hpkc010.getFactoryCode());
} else { } else {
HPKCTools.updateProdStock(dbKc013.getWhCode(), dbKc013.getProdNo(), HPKCTools.updateProdStock(dbKc013.getWhCode(), dbKc013.getProdNo(),
newKc013.getAmount(), newKc013.getWeight(), hpkc011.getFactoryCode()); newKc013.getAmount(), newKc013.getWeight(), hpkc011.getFactoryCode());
......
...@@ -4,6 +4,7 @@ import com.baosight.hpjx.core.dao.DaoBase; ...@@ -4,6 +4,7 @@ import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.*; import com.baosight.hpjx.hp.kc.domain.*;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -441,7 +442,7 @@ public class HPKCTools { ...@@ -441,7 +442,7 @@ public class HPKCTools {
* @param weight * @param weight
*/ */
public static void updateStock(String whCode, Long inventRecordId, BigDecimal amount, BigDecimal weight,String factCode) { public static void updateStock(String whCode, Long inventRecordId, BigDecimal amount, BigDecimal weight,String factCode) {
updateStock(whCode, inventRecordId, amount, BigDecimal.ZERO, weight,factCode); updateStock(whCode, inventRecordId, amount, HPPZTools.HpPz006.calcUnitWeight(inventRecordId), weight,factCode);
} }
/** /**
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<sqlMap namespace="HPMT002"> <sqlMap namespace="HPMT002">
<select id="pmProject" resultClass="java.util.HashMap"> <select id="pmProject" resultClass="java.util.HashMap">
SELECT * FROM ( <!-- SELECT * FROM (-->
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
PROJ_NAME LIKE CONCAT('%', #projName#, '%') PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty> </isNotEmpty>
order by STATUS,PLAN_COMPLETION_DATE order by STATUS,PLAN_COMPLETION_DATE
) AS A WHERE actualCompletionNum!=num <!-- ) AS A WHERE actualCompletionNum!=num-->
limit #offset#, #pageSize# limit #offset#, #pageSize#
</select> </select>
<select id="pmProjectCount" resultClass="java.util.HashMap"> <select id="pmProjectCount" resultClass="java.util.HashMap">
SELECT * FROM ( <!-- SELECT * FROM (-->
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
PROJ_NAME LIKE CONCAT('%', #projName#, '%') PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty> </isNotEmpty>
order by STATUS,PLAN_COMPLETION_DATE order by STATUS,PLAN_COMPLETION_DATE
) AS A WHERE actualCompletionNum!=num <!-- ) AS A WHERE actualCompletionNum!=num-->
</select> </select>
<select id="pmQuality" resultClass="java.util.HashMap"> <select id="pmQuality" resultClass="java.util.HashMap">
......
...@@ -247,10 +247,10 @@ ...@@ -247,10 +247,10 @@
a.PROJ_NAME, a.PROJ_NAME,
a.DELIVERY_DATE, a.DELIVERY_DATE,
concat(left(max(a.PLAN_COMPLETION_DATE),4),'/',substring(max(a.PLAN_COMPLETION_DATE),5,2),'/',right(max(a.PLAN_COMPLETION_DATE),2)) as JHDATE, concat(left(max(a.PLAN_COMPLETION_DATE),4),'/',substring(max(a.PLAN_COMPLETION_DATE),5,2),'/',right(max(a.PLAN_COMPLETION_DATE),2)) as JHDATE,
concat(format(ifnull(sum(b.NUM*b.UNIT_WT ),0),2),'吨') as JHCL, concat(format(ifnull(sum(b.NUM*b.UNIT_WT/1000 ),0),2),'吨') as JHCL,
concat(format(ifnull(sum(c.WEIGHT),0),2),'吨') as SJCL, concat(format(ifnull(sum(c.WEIGHT),0),2),'吨') as SJCL,
concat(format((ifnull( sum( c.WEIGHT ), 0 ) / ifnull( sum( b.NUM*b.UNIT_WT ), 0 ) * 100),2),'%') as SCJD, concat(format((ifnull( sum( c.AMOUNT*b.UNIT_WT/1000 ), 0 ) / ifnull( sum( b.NUM*b.UNIT_WT/1000 ), 0 ) * 100),2),'%') as SCJD,
concat(format((ifnull( sum( d.WEIGHT ), 0 ) / ifnull( sum( b.NUM*b.UNIT_WT ), 0 ) * 100),2),'%') as FHJD concat(format((ifnull( sum( d.AMOUNT*d.UNIT_WEIGHT ), 0 ) / ifnull( sum( b.NUM*b.UNIT_WT ), 0 ) * 100),2),'%') as FHJD
from hpjx.T_HPSC003 a from hpjx.T_HPSC003 a
join hpjx.T_HPSC004 b on b.PARENT_ID = a.PLAN_INFO_NO join hpjx.T_HPSC004 b on b.PARENT_ID = a.PLAN_INFO_NO
left join hpjx.T_HPkC003 c on c.PROD_ORDER_NO = b.PROD_ORDER_NO left join hpjx.T_HPkC003 c on c.PROD_ORDER_NO = b.PROD_ORDER_NO
......
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