Commit a1e09350 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents ab21e766 a0a5dc3b
...@@ -2,18 +2,17 @@ package com.baosight.hggp.hg.kc.service; ...@@ -2,18 +2,17 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.*; import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC007; import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.HGKC007A; import com.baosight.hggp.hg.kc.domain.HGKC007A;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.pz.domain.HGPZ004; import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
...@@ -23,7 +22,6 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -23,7 +22,6 @@ 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;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*; import java.util.*;
...@@ -44,25 +42,24 @@ public class ServiceHGKC007A extends ServiceBase { ...@@ -44,25 +42,24 @@ public class ServiceHGKC007A extends ServiceBase {
@Override @Override
@OperationLogAnnotation(operModul = "其他出库明细", operType = "查询", operDesc = "初始化") @OperationLogAnnotation(operModul = "其他出库明细", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo, new HGKC007A());
try { try {
String whCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_WH_CODE); EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
String companyCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_COMPANY_CODE); List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
Map map = new HashMap(); CommonMethod.initBlock(outInfo,
map.put(HGKC007A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC007A.FIELD_WH_CODE, whCode);
map.put(HGKC007A.FIELD_COMPANY_CODE, companyCode);
map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo,
Arrays.asList( Arrays.asList(
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID, DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID, DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false DdynamicEnum.SPEC_BOX_BLOCK_ID),
); new HashMap<String,Object>(){{
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata); put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
} catch (PlatException e) { put(HGKC013A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); }}, false);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata);
}catch (Exception e){
LogUtils.setDetailMsg(outInfo, e, "初始化失败");
} }
return inInfo; return outInfo;
} }
/** /**
......
...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -205,7 +206,7 @@ public class ServiceHGPZ002 extends ServiceBase { ...@@ -205,7 +206,7 @@ public class ServiceHGPZ002 extends ServiceBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<String> custCodes = resultRows.stream().map(row -> row.get(HGPZ002.FIELD_CUST_CODE).toString()).collect(Collectors.toList()); List<String> custCodes = resultRows.stream().map(row -> row.get(HGPZ002.FIELD_CUST_CODE).toString()).collect(Collectors.toList());
List<HGCW002> hgcw002List = queryCustCode(custCodes); List<HGSC001> hgsc001List = queryCustCode(custCodes);
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGPZ002 hgpz002 = new HGPZ002(); HGPZ002 hgpz002 = new HGPZ002();
hgpz002.fromMap(resultRow); hgpz002.fromMap(resultRow);
...@@ -214,26 +215,28 @@ public class ServiceHGPZ002 extends ServiceBase { ...@@ -214,26 +215,28 @@ public class ServiceHGPZ002 extends ServiceBase {
if (count > 0) { if (count > 0) {
//throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz002.getAccountName())); //throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz002.getAccountName()));
} }
List<HGCW002> hgcw002s =hgcw002List.stream().filter(hgcw002 -> hgcw002.getPartyA().equals(hgpz002.getCustCode())).collect(Collectors.toList()); List<HGSC001> hgcw002s =hgsc001List.stream().filter(hgsc001 ->
AssertUtils.isNotEmpty(hgcw002s, String.format("客户[%s]已关联业务,请先解除业务", hgpz002.getCustName())); hgsc001.getSubcontractCode().equals(hgpz002.getCustCode())||
hgsc001.getGenralContractCode().equals(hgpz002.getCustCode())
).collect(Collectors.toList());
AssertUtils.isNotEmpty(hgcw002s, String.format("客户[%s]已关联业务,无法删除", hgpz002.getCustName()));
DaoUtils.update(HGPZ002.DELETE, hgpz002); DaoUtils.update(HGPZ002.DELETE, hgpz002);
} }
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() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败"); LogUtils.setDetailMsg(inInfo, e, "删除失败");
} }
return inInfo; return inInfo;
} }
public List<HGCW002> queryCustCode(List<String> custCodes){ public List<HGSC001> queryCustCode(List<String> custCodes){
List<HGCW002> hgcw002List = DaoBase.getInstance().query(HGCW002.QUERY, List<HGSC001> hgsc001List = DaoBase.getInstance().query(HGSC001.QUERY,
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put("partyA", custCodes); put("custCodes", custCodes);
put("partyB", custCodes);
}}); }});
return hgcw002List; return hgsc001List;
} }
} }
...@@ -44,7 +44,7 @@ public class ServiceHGSC010A extends ServiceEPBase { ...@@ -44,7 +44,7 @@ public class ServiceHGSC010A extends ServiceEPBase {
Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID), Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{ new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1); put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode())); /*put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));*/
}}, false); }}, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010A().eiMetadata);
......
...@@ -49,7 +49,7 @@ public class ServiceHGSC010B extends ServiceEPBase { ...@@ -49,7 +49,7 @@ public class ServiceHGSC010B extends ServiceEPBase {
Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID), Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{ new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1); put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode())); //put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));
}}, false); }}, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010B().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010B().eiMetadata);
......
...@@ -40,7 +40,7 @@ public class ServiceHGSC010C extends ServiceEPBase { ...@@ -40,7 +40,7 @@ public class ServiceHGSC010C extends ServiceEPBase {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour()); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
inInfo = super.query(inInfo, HGYX001C.QUERY, new HGYX001C()); inInfo = super.query(inInfo, HGYX001C.QUERY, new HGYX001C());
Map<String, Object> queryMap = new HashMap<>(); Map<String, Object> queryMap = new HashMap<>();
queryMap.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour()); //queryMap.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList( Arrays.asList(
DdynamicEnum.INVENT_TYPE_BLOCK_ID, DdynamicEnum.INVENT_TYPE_BLOCK_ID,
......
...@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoBase; ...@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -38,6 +39,9 @@ public class ServiceHGSC012 extends ServiceEPBase { ...@@ -38,6 +39,9 @@ public class ServiceHGSC012 extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
if (queryMap.containsKey("contractDate")){
queryMap.put("contractDate", DateUtils.formatShort(queryMap.get("contractDate")));
}
List<Map> list = DaoBase.getInstance().query("HGSC012.query", queryMap); List<Map> list = DaoBase.getInstance().query("HGSC012.query", queryMap);
inInfo.set(EiConstant.resultBlock, list); inInfo.set(EiConstant.resultBlock, list);
}catch (Exception e){ }catch (Exception e){
......
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/10/24
* @description 生产管理
*/
public class ServiceHGSC013 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID, DdynamicEnum.PROJ_RECORD_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
if (queryMap.containsKey("contractDate")){
queryMap.put("contractDate", DateUtils.formatShort(queryMap.get("contractDate")));
}
List<Map> list = DaoBase.getInstance().query("HGSC013.query", queryMap);
inInfo.set(EiConstant.resultBlock, list);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
...@@ -122,6 +122,10 @@ ...@@ -122,6 +122,10 @@
<isNotEmpty prepend=" AND " property="branchUnit"> <isNotEmpty prepend=" AND " property="branchUnit">
branch_unit = #branchUnit# branch_unit = #branchUnit#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custCodes">
(subcontract_code in <iterate close=")" open="(" conjunction="," property="custCodes">#custCodes[]#</iterate>
or genral_contract_code in <iterate close=")" open="(" conjunction="," property="custCodes">#custCodes[]#</iterate>)
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGSC013">
<select id="query" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select
h.company_code as "companyCode", <!-- 公司编码(预留) -->
h.company_name as "companyName", <!-- 公司名称(预留) -->
h.proj_code as "projCode", <!-- 项目编码(预留) -->
h.proj_name as "projName", <!-- 项目名称(预留) -->
ha.product_code as "productCode", <!-- 产品编号 -->
ha.product_name as "productName", <!-- 产品名称 -->
ha.spec as "spec", <!-- 规格 -->
ha.length as "length", <!-- 长 -->
ha.width as "width", <!-- 宽 -->
ha.thick as "thick", <!-- 厚 -->
ha.quantity as "quantity", <!-- 数量 -->
ha.single_weight as "singleWeight", <!-- 单重 -->
ha.total_weight as "totalWeight", <!-- 总重 -->
ha.DEPOSIT_DATE as "depositDate", <!-- 入库日期 -->
ha.INV_QTY as "invQty", <!-- 数量 -->
ha.INV_UNIT_WEIGHT as "invUnitWeight", <!-- 单重 -->
ha.INV_WEIGHT as "invWeight", <!-- 重量 -->
hb.product_code as "clproductCode" , <!-- 产品编号 -->
hb.product_name as "clproductName", <!-- 产品名称 -->
hb.spec as "clspec", <!-- 规格 -->
hb.length as "cllength", <!-- 长 -->
hb.width as "clwidth", <!-- 宽 -->
hb.thick as "clthick", <!-- 厚 -->
hb.quantity as "clquantity", <!-- 数量 -->
hb.total_weight as "cltotalWeight", <!-- 总重 -->
hb.RECEIPT_DATE as "receiptDate", <!-- 领料日期 -->
hb.INV_QTY as "llinvQty", <!-- 数量 -->
hb.INV_WEIGHT as "llinvWeight" <!-- 重量 -->
from hggp.hgsc004 h
join (
select
h.id , -- 主键 -->
h.company_code , -- 公司编码(预留) -->
h.company_name , -- 公司名称(预留) -->
h.proj_code , -- 项目编码(预留) -->
h.proj_name , -- 项目名称(预留) -->
h.parent_prod_code , -- 父节点-产品编码 -->
h.parent_prod_name , -- 父节点-产品名称 -->
h.material_id , -- 物料清单id -->
h.product_id , -- 产品id -->
h.product_type , -- 产品类别 -->
h.product_code , -- 产品编号 -->
h.product_name , -- 产品名称 -->
h.invent_type , -- 档案类型 -->
h.spec , -- 规格 -->
h.length , -- 长 -->
h.width , -- 宽 -->
h.thick , -- 厚 -->
h.quantity , -- 数量 -->
h.single_weight , -- 单重 -->
h.total_weight , -- 总重 -->
h.approval_status , -- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , -- 是否有叶子节点 -->
h.sort , -- 排序字段 -->
h.lv , -- 层级 -->
k.DEPOSIT_DATE , -- 入库日期 -->
k.INV_QTY , -- 数量 -->
k.INV_UNIT_WEIGHT , -- 单重 -->
k.INV_WEIGHT -- 重量 -->
from hggp.hgsc004a h
left join hggp.hgkc003 k on h.company_code = k.COMPANY_CODE and h.proj_code = k.PROJ_CODE
and h.product_code = k.PRDT_CODE
and k.DELETE_FLAG = 0
where h.product_status = 1 and h.lv = 3
<isNotEmpty prepend=" AND " property="accountCode">
h.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
h.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
h.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
h.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
h.proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
h.product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate">
k.DEPOSIT_DATE = #depositDate#
</isNotEmpty>
) ha on h.id = ha.material_id
join (
select
h.id , -- 主键 -->
h.company_code , -- 公司编码(预留) -->
h.company_name , -- 公司名称(预留) -->
h.proj_code , -- 项目编码(预留) -->
h.proj_name , -- 项目名称(预留) -->
h.parent_prod_code , -- 父节点-产品编码 -->
h.parent_prod_name , -- 父节点-产品名称 -->
h.material_id , -- 物料清单id -->
h.product_id , -- 产品id -->
h.product_type , -- 产品类别 -->
h.product_code , -- 产品编号 -->
h.product_name , -- 产品名称 -->
h.invent_type , -- 档案类型 -->
h.spec , -- 规格 -->
h.length , -- 长 -->
h.width , -- 宽 -->
h.thick , -- 厚 -->
h.quantity , -- 数量 -->
h.single_weight , -- 单重 -->
h.total_weight , -- 总重 -->
h.approval_status , -- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , -- 是否有叶子节点 -->
h.sort , -- 排序字段 -->
h.lv , -- 层级 -->
k.RECEIPT_DATE , -- 入库日期 -->
k.INV_QTY , -- 数量 -->
k.INV_WEIGHT -- 重量 -->
from hggp.hgsc004a h
left join (
select
k.COMPANY_CODE ,
k.PROJ_CODE ,
k1.RECEIPT_DATE , -- 入库日期 -->
k.INVENT_CODE ,
sum(k.INV_QTY) as INV_QTY, -- 数量 -->
sum(k.INV_WEIGHT) as INV_WEIGHT -- 重量 -->
from hggp.hgkc008a k
join hggp.hgkc008 k1 on k.RECEIVE_ID = k1.id
where k.DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
k.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
k.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
k.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
k.RECEIPT_DATE = #receiptDate#
</isNotEmpty>
group by k.COMPANY_CODE, k.PROJ_CODE, k1.RECEIPT_DATE, k.INVENT_CODE
) k on h.company_code = k.COMPANY_CODE
and h.proj_code = k.PROJ_CODE
and h.product_code = k.INVENT_CODE
where h.lv = 4 and h.product_status = 1
<isNotEmpty prepend=" AND " property="accountCode">
h.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
h.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
h.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
h.product_code = #inventCode#
</isNotEmpty>
) hb on h.id = hb.material_id and ha.product_code = hb.parent_prod_code
order by h.id desc
</select>
</sqlMap>
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/10/24
Time: 14:51
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script>
<style>
table{
border-color: #99d2ff;
}
table tr{
}
table tr th{
padding: 2px 8px;
font-size: .8125rem;
color: #2f80ed;
background: #dbefff;
height: 30px;
text-align: center;
}
table tr th span{
white-space: nowrap;
}
table tr td span{
white-space: nowrap;
}
table tr td{
padding: 0 8px;
height: 25px;
}
#table-box{
position: relative;
width: 100%;
overflow: auto;
min-height: 100%;
height: 74vh;
}
#table-box .table-content{
position: absolute;
min-height: 100%;
min-width: 100%;
}
.bg-blue{
background-color: #eff8ff;
}
</style>
<EF:EFPage title="委外执行加工表">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="contractDate" cname="委外加工日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="contractCode" cname="委外加工单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="supCode" cname="供应商名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
</EF:EFGrid>
<section id="table-box">
<section class="table-content">
<table border="1" >
<colgroup>
<col v-for="(item,k) in columns2" :key="k">
</colgroup>
<thead>
<tr>
<th v-for="(item,k) in columns" :key="k" :colspan="item.colspan">
<span>{{item.label}}</span>
</th>
</tr>
<tr>
<th v-for="(item,k) in columns2" :key="k" >
<span>{{item.label}}</span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(valObj,i) in list" :key="i">
<td v-for="(item,k) in columns2" :key="k" v-if="valObj[item.value].show" :rowspan="valObj[item.value].rowspan" :class="i/2%1?'bg-blue':''">
<span>{{valObj[item.value].value}}</span>
</td>
</tr>
</tbody>
</table>
</section>
</section>
</EF:EFRegion>
</EF:EFPage>
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