change - 物料信息添加商品编码、商品名称维护

master
yinq 8 months ago
parent d2e6cb0f20
commit d75525f51a

@ -37,7 +37,6 @@ public interface PdaBindingMapper {
* @param code
* @return
*/
@DataSource(value = DataSourceType.SLAVE)
List<HashMap<String, String>> selectPrintBarcode(String code);
/**

@ -103,6 +103,30 @@ public class BaseMaterialInfo extends BaseEntity
@Excel(name = "SAP计划员")
private String DISPO;
/** 商品编码 */
@Excel(name = "商品编码")
private String productCode;
/** 商品名称 */
@Excel(name = "商品名称")
private String productName;
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getDISPO() {
return DISPO;
}

@ -23,6 +23,8 @@
<result property="updatedTime" column="updated_time" />
<result property="incrementDate" column="increment_date" />
<result property="DISPO" column="DISPO" />
<result property="productCode" column="product_code" />
<result property="productName" column="product_name" />
</resultMap>
<sql id="selectBaseMaterialInfoVo">
@ -45,7 +47,9 @@
ml.created_by,
ml.created_time,
ml.updated_by,
ml.updated_time
ml.updated_time,
ml.product_code,
ml.product_name
from base_materialinfo ml
left join base_factory bf on bf.factory_code = ml.plant_code
left join base_productline bpl on bpl.PRODUCT_LINE_CODE = ml.productline_code
@ -69,6 +73,8 @@
<if test="createdTime != null "> and ml.created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and ml.updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and ml.updated_time = #{updatedTime}</if>
<if test="productCode != null and productCode != ''"> and ml.product_code = #{productCode}</if>
<if test="productName != null and productName != ''"> and ml.product_name = #{productName}</if>
</where>
order by ml.material_subclass, ml.increment_date desc
</select>
@ -102,6 +108,8 @@
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="DISPO != null">DISPO,</if>
<if test="productCode != null">product_code,</if>
<if test="productName != null">product_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
@ -122,6 +130,8 @@
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="DISPO != null">#{DISPO},</if>
<if test="productCode != null">#{productCode},</if>
<if test="productName != null">#{productName},</if>
</trim>
</insert>
@ -145,6 +155,8 @@
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="DISPO != null">DISPO = #{DISPO},</if>
<if test="productCode != null">product_code = #{productCode},</if>
<if test="productName != null">product_name = #{productName},</if>
</trim>
where obj_id = #{objId}
</update>

@ -39,19 +39,34 @@
) SD
</select>
<select id="homeColumnarInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') BEGIN_DATE,
bm.PRODUCT_LINE_CODE,
SUM(boi.COMPLETE_AMOUNT) COMPLETE_AMOUNT,
ROUND(SUM(boi.COMPLETE_AMOUNT) / SUM(boi.ORDER_AMOUNT) * 100, 0) RATE
SELECT PL.PRODUCT_LINE_CODE,
day_of_week BEGIN_DATE,
NVL(OFFLINE_SUM, 0) COMPLETE_AMOUNT,
ROUND(NVL(OFFLINE_SUM / ORDER_AMOUNT * 100, 0), 2) RATE
FROM (
SELECT day_of_week, PRODUCT_LINE_CODE
FROM (
SELECT TO_CHAR(TRUNC(SYSDATE, 'IW') + LEVEL - 1, 'YYYY-MM-DD') AS day_of_week
FROM DUAL
CONNECT BY LEVEL &lt;= 7) WK
CROSS JOIN BASE_PRODUCTLINE
WHERE PRODUCT_LINE_TYPE = 1) PL
LEFT JOIN (SELECT PRODUCT_LINE_CODE,
TO_CHAR(PRODUCT_SCANTIME, 'YYYY-MM-DD') PRODUCT_SCANTIME,
COUNT(*) OFFLINE_SUM
FROM C##AUCMA_SCADA.PRODUCT_OFFLINE
GROUP BY PRODUCT_LINE_CODE, TO_CHAR(PRODUCT_SCANTIME, 'YYYY-MM-DD')) OL
ON PL.PRODUCT_LINE_CODE = OL.PRODUCT_LINE_CODE AND
PL.day_of_week = OL.PRODUCT_SCANTIME
LEFT JOIN (SELECT PL.PRODUCT_LINE_CODE,
TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') BEGIN_DATE,
SUM(ORDER_AMOUNT) ORDER_AMOUNT
FROM BASE_ORDERINFO boi
JOIN BASE_MATERIALINFO bm ON bm.MATERIAL_CODE = boi.material_code AND bm.DISPO IN ('100')
JOIN BASE_PRODUCTLINE bm ON bm.WORK_CENTER_CODE = boi.WORK_CENTER_CODE
WHERE TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') IN
(SELECT TO_CHAR(TRUNC(SYSDATE, 'IW') + LEVEL - 1, 'YYYY-MM-DD') AS day_of_week
FROM DUAL
CONNECT BY LEVEL &lt;= 7)
GROUP BY TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD'), bm.PRODUCT_LINE_CODE
ORDER BY BEGIN_DATE
JOIN BASE_PRODUCTLINE PL ON PL.WORK_CENTER_CODE = boi.WORK_CENTER_CODE
GROUP BY PL.PRODUCT_LINE_CODE, TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD')) OD
ON OD.PRODUCT_LINE_CODE = OL.PRODUCT_LINE_CODE AND PL.day_of_week = OD.BEGIN_DATE
ORDER BY PRODUCT_LINE_CODE,BEGIN_DATE
</select>
<select id="homeLineInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') BEGIN_DATE,

@ -101,7 +101,7 @@
<if test="syncDatetime != null ">and sync_datetime = #{syncDatetime}</if>
<if test="frequency != null ">and frequency = #{frequency}</if>
</where>
order by begindatetime
order by enddatetime DESC
</select>
<select id="selectBoxTemperatureHistoryByObjId" parameterType="Long" resultMap="BoxTemperatureHistoryResult">

@ -173,7 +173,7 @@
GROUP BY FY.FACTORY_NAME, BPP.PRODUCT_LINE_NAME, TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD'),
RQI.STATION_CODE, BP.PRODUCT_LINE_NAME, GET_MATERIAL_TYPE(RQI.MATERIAL_NAME),
RQI.QUALITY_DEFECT_CODE, RQI.QUALITY_DEFECT_NAME
ORDER BY INSPECTOR_TIME DESC
ORDER BY DEFECT_NUMBER DESC
</select>
<select id="qualityIssuesReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT BF.FACTORY_NAME,

Loading…
Cancel
Save