Commit 4c176149 by yukang

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

parents 0c71f640 f5aa6a46
package com.baosight.hpjx.core.configuration;
import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import com.baosight.iplat4j.eu.dm.PlatFileUploadManagerByAmazonS3;
import com.baosight.iplat4j.eu.dm.util.PlatFileUploader;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import lombok.extern.slf4j.Slf4j;
/**
* 初始化注入bean
*
* @author:songx
* @date:2024/3/13,15:03
*/
@Slf4j
@Configuration
@ConditionalOnProperty(
name = {"iplat4j.admin.objectStorage.s3.switch"},
havingValue = "on"
)
public class ConfigurationBean {
@Bean(name = "platFileUploader")
public PlatFileUploader newPlatFileUploader() {
return new PlatFileUploader();
}
@Bean(name = "fileUpLoadManager")
public PlatFileUploadManagerByAmazonS3 newPlatFileUploadManagerByAmazonS3() {
String str = PlatApplicationContext.getProperty("iplat4j.admin.objectStorage.s3.switch");
log.warn("str -> {}", str);
return new PlatFileUploadManagerByAmazonS3();
}
}
......@@ -57,6 +57,8 @@ public class ServiceHPKC003A extends ServiceEPBase {
Map queryMap = new HashMap();
queryMap.put("inventTypes", new String[]{"2","3"});
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
......@@ -23,6 +24,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -33,7 +35,9 @@ import java.util.Map;
* @date:2022/7/11,11:08
*/
public class ServiceHPKC005A extends ServiceEPBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()};
/**
* 初始化
*
......@@ -44,10 +48,12 @@ public class ServiceHPKC005A extends ServiceEPBase {
@OperationLogAnnotation(operModul = "库存查询", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), null, false);
Map queryMap = new HashMap();
queryMap.put("inventTypes", DEFAULT_INVENT_CODE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), queryMap, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC010().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -197,7 +197,7 @@
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
ORDER BY PROJ_CODE
ORDER BY PRDT_CODE
</select>
<!--计划完成时间回写-->
......
......@@ -394,7 +394,7 @@
<isNotEmpty prepend=" AND " property="parentPrdtCode">
B.PRDT_CODE = #parentPrdtCode#
</isNotEmpty>
ORDER BY A.PROJ_CODE
ORDER BY A.PRDT_CODE
</select>
<select id="queryDate" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
......
......@@ -11,9 +11,12 @@ import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.FrameworkInfo;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.ioc.spring.ProjectConfig;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils;
......@@ -59,7 +62,13 @@ public class ServiceHPZL001A extends ServiceEPBase {
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPZL001A.QUERY, new HPZL001A());
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if ("run".equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HPZL001A.queryRun", new HPZL001A());
} else {
inInfo = super.query(inInfo, "HPZL001A.queryDev", new HPZL001A());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
......
......@@ -9,7 +9,6 @@
A.CHECK_ID as "checkId", <!-- 检查单ID -->
A.DOC_TYPE as "docType", <!-- 文件类型 -->
A.DOC_ID as "docId", <!-- 文件ID -->
B.DOC_NAME as "docName", <!-- 文件名称 -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
......@@ -18,6 +17,16 @@
A.UPDATED_TIME as "updatedTime"<!-- 修改时间 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
......@@ -77,9 +86,9 @@
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001A">
<select id="queryDev" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001A">
SELECT
<include refid="column"/>
<include refid="columnDev"/>
FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM02 B
WHERE 1=1
AND A.DOC_ID = B.DOC_ID
......@@ -88,13 +97,31 @@
<include refid="order"/>
</select>
<select id="count" resultClass="int">
<select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<select id="queryRun" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001A">
SELECT
<include refid="columnRun"/>
FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM05 B
WHERE 1=1
AND A.DOC_ID = B.RES_ID
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countRun" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPZL001A (
COMPANY_CODE, <!-- 企业编码 预留 -->
......
......@@ -3,11 +3,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="platFileUploader" class="com.baosight.iplat4j.eu.dm.util.PlatFileUploader">
<property name="dao" ref="platDao"/>
</bean>
<!-- <bean id="platFileUploader" class="com.baosight.iplat4j.eu.dm.util.PlatFileUploader">-->
<!-- <property name="dao" ref="platDao"/>-->
<!-- </bean>-->
<bean id="fileUpLoadManager" class="com.baosight.iplat4j.eu.dm.PlatFileUploadManagerByAmazonS3">
<property name="fileUploader" ref="platFileUploader"/>
</bean>
<!-- <bean id="fileUpLoadManager" class="com.baosight.iplat4j.eu.dm.PlatFileUploadManagerByAmazonS3">-->
<!-- <property name="fileUploader" ref="platFileUploader"/>-->
<!-- </bean>-->
</beans>
......@@ -8,10 +8,11 @@
Logger log = LoggerFactory.getLogger(IFileUploadManager.class);
try {
String result = AdminFactoryConfig.getFileUpLoadInterface().uploadFile(pageContext);
out.print(result);
log.info("uploadFile result:{}", result);
} catch (Exception e) {
log.error("附件上传时出现异常{}", e.getMessage(), e);
response.sendError(500, e.getMessage());
return;
out.print("{msg: \"" + e.getMessage() + "\"}");
}
%>
......@@ -61,7 +61,7 @@
<EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="100" align="right"
required="true" readonly="true"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="重量(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="length" cname="长(MM)" width="80" align="right" format="{0:N3}" readonly="true"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="80" align="right" format="{0:N3}" readonly="true"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="80" align="right" format="{0:N3}" readonly="true"/>
......
......@@ -72,7 +72,7 @@
align="right"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" format="{0:N3}" maxLength="20" width="100"
align="right"/>
<EF:EFColumn ename="weight" cname="重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="100"
<EF:EFColumn ename="weight" cname="总重(KG)" enable="false" format="{0:N3}" maxLength="20" width="100"
align="right"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/>
<EF:EFColumn ename="oldReqNo" cname="原领料单号" enable="false" width="140" align="center"/>
......
......@@ -51,7 +51,7 @@
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="weight" cname="重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
......
......@@ -14,10 +14,18 @@
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="厂区名称" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="生产组名称" ename="orgName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="工厂" blockId="inqu_status" ename="factoryCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%--<EF:EFInput cname="生产组名称" ename="orgName" blockId="inqu_status" row="0" colWidth="3"/>--%>
<EF:EFSelect cname="生产组" blockId="inqu_status" ename="groupCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</div>
</EF:EFRegion>
......
......@@ -10,7 +10,7 @@
<div class="row">
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2', '5')"/>
</EF:EFSelect>
<EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
......
......@@ -60,7 +60,7 @@
<EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="100" align="right"
sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="unitWeight" cname="单重" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="重量" enable="false" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="weight" cname="总重" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="length" cname="长" width="100" align="center" format="{0:N3}" required="false"
readonly="true"/>
......
......@@ -66,7 +66,7 @@
<EF:EFColumn ename="amount" cname="数量" enable="false" format="{0:N0}" width="100" align="right"
sumType="all"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" format="{0:N3}" width="100" align="right"/>
<EF:EFColumn ename="weight" cname="重量(KG)" enable="false" format="{0:N3}" width="100" align="right"
<EF:EFColumn ename="weight" cname="总重(KG)" enable="false" format="{0:N3}" width="100" align="right"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="oldOuterNo" cname="原出库单号" enable="false" width="140" align="center"/>
......
......@@ -46,7 +46,7 @@
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="重量(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
......@@ -15,16 +15,17 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-inventCode" cname="部件名称" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="material_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-subInventCode" cname="零件名称" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="material_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="inqu_status-0-inventCode" cname="部件名称" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="material_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-subInventCode" cname="零件名称" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="material_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
......@@ -47,7 +48,7 @@
<EF:EFColumn ename="prdtSpec" cname="规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="90" align="right" required="true" enable="false"/>
<EF:EFColumn ename="unitWeight" cname="单重(T)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="weight" cname="重量(T)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="weight" cname="总重(T)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<%--<EF:EFColumn ename="remark" cname="备注" width="120" align="center" enable="false"/>--%>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
......
......@@ -39,7 +39,8 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" enable="false" width="110" align="center">
<EF:EFColumn ename="userId" cname="工号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" enable="false" width="110" align="center">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupType" cname="部门类型" enable="false" width="80" align="center">
......@@ -48,7 +49,6 @@
<EF:EFComboColumn ename="groupCode" cname="生产部门" enable="false" width="110" align="center">
<EF:EFOptions blockId="group_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="userId" cname="工号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="userName" cname="姓名" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="gender" cname="性别" enable="false" width="80" align="center"
valueField="valueField" textField="textField">
......
......@@ -44,7 +44,7 @@
<EF:EFColumn ename="assignedNum" cname="派工数量" enable="false" width="80" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unassignedNum" cname="剩余数量" enable="false" width="80" align="right" format="{0:N0}"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="80" align="right" format="{0:N0}"/>
<EF:EFColumn ename="totalWt" cname="重量(T)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="80" align="right" format="{0:N3}"/>
<%--<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>--%>
<EF:EFColumn ename="remark1" cname="零件备注" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="100" align="center" hidden="true"/>
......
......@@ -42,7 +42,7 @@
<EF:EFColumn ename="completeNum" cname="完成数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unCompleteNum" cname="剩余数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="totalWt" cname="重量(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center" hidden="true"/>
......
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