update - add清单率报表

master
yinq 11 months ago
parent 43c2e012b3
commit 72614e6264

@ -111,6 +111,19 @@ public class BaseProductLine extends BaseEntity {
*/
private String workCenterName;
/**
*
*/
private String executionSort;
public String getExecutionSort() {
return executionSort;
}
public void setExecutionSort(String executionSort) {
this.executionSort = executionSort;
}
public String getWorkCenterCode() {
return workCenterCode;
}

@ -96,6 +96,34 @@ public class BaseStoreInfo extends BaseEntity {
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
/**
* 线
*/
@Excel(name = "产线编号")
private String productLineCode;
/**
* 线
*/
@Excel(name = "产线名称")
private String productLineName;
public String getProductLineName() {
return productLineName;
}
public void setProductLineName(String productLineName) {
this.productLineName = productLineName;
}
public String getProductLineCode() {
return productLineCode;
}
public void setProductLineCode(String productLineCode) {
this.productLineCode = productLineCode;
}
public String getPlantCode() {
return plantCode;
}

@ -42,6 +42,11 @@ public class MaterialConstants {
*/
public static final String AFTER_MATERIAL_TYPE = "700";
/**
*
*/
public static final String OTHER_MATERIAL_TYPE = "900";
/**
* SAP

@ -22,6 +22,7 @@
<result property="stationType" column="station_type"/>
<result property="workCenterCode" column="work_center_code"/>
<result property="workCenterName" column="work_center_name"/>
<result property="executionSort" column="execution_sort"/>
</resultMap>
<sql id="selectBaseProductLineVo">
@ -37,6 +38,7 @@
bpl.created_time,
bpl.updated_by,
bpl.updated_time,
bpl.execution_sort,
bpl.PARENT_ID,
bpl.work_center_code,
bpl.work_center_name,
@ -102,6 +104,7 @@
<if test="stationType != null">station_type,</if>
<if test="workCenterCode != null">work_center_code,</if>
<if test="workCenterName != null">work_center_name,</if>
<if test="executionSort != null">execution_sort,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
@ -118,6 +121,7 @@
<if test="stationType != null">#{stationType},</if>
<if test="workCenterCode != null">#{workCenterCode},</if>
<if test="workCenterName != null">#{workCenterName},</if>
<if test="executionSort != null">#{executionSort},</if>
</trim>
</insert>
@ -137,6 +141,7 @@
<if test="stationType != null">station_type = #{stationType},</if>
<if test="workCenterCode != null">work_center_code = #{workCenterCode},</if>
<if test="workCenterName != null">work_center_name = #{workCenterName},</if>
<if test="executionSort != null">execution_sort = #{executionSort},</if>
</trim>
where obj_id = #{objId}
</update>

@ -18,6 +18,8 @@
<result property="updatedTime" column="updated_time"/>
<result property="plantCode" column="factory_code"/>
<result property="plantName" column="factory_name"/>
<result property="productLineCode" column="product_line_code"/>
<result property="productLineName" column="product_line_name"/>
</resultMap>
<sql id="selectBaseStoreInfoVo">
@ -32,10 +34,12 @@
si.created_time,
si.updated_by,
si.updated_time,
pl.product_line_name,
si.factory_code,
bf.factory_name
from base_storeinfo si
left join base_factory bf on bf.factory_code = si.factory_code
left join BASE_PRODUCTLINE pl on pl.product_line_code = si.product_line_code
</sql>
<select id="selectBaseStoreInfoList" parameterType="BaseStoreInfo" resultMap="BaseStoreInfoResult">
@ -53,6 +57,7 @@
<if test="createdTime != null ">and si.created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and si.updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and si.updated_time = #{updatedTime}</if>
<if test="productLineCode != null ">and si.product_line_code = #{productLineCode}</if>
</where>
</select>
@ -79,6 +84,7 @@
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="plantCode != null">factory_code,</if>
<if test="productLineCode != null">product_line_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
@ -93,6 +99,7 @@
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="plantCode != null">#{plantCode},</if>
<if test="productLineCode != null">#{productLineCode},</if>
</trim>
</insert>
@ -110,6 +117,7 @@
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="plantCode != null">factory_code = #{plantCode},</if>
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
</trim>
where obj_id = #{objId}
</update>

@ -0,0 +1,37 @@
package com.aucma.report.controller;
import com.aucma.common.core.controller.BaseController;
import com.aucma.common.core.domain.AjaxResult;
import com.aucma.common.core.page.TableDataInfo;
import com.aucma.report.service.IProductionReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* PDAController
*
* @author Yinq
* @date 2023-11-21
*/
@RestController
@RequestMapping("/report/productionReport")
public class ProductionReportController extends BaseController {
@Autowired
private IProductionReportService productionReportService;
/**
*
*/
@GetMapping("/inventoryRateReportList")
public AjaxResult inventoryRateReportList(@RequestParam(required = false) Map hashMap) {
List<HashMap<String, Object>> list = productionReportService.inventoryRateReportList(hashMap);
return success(list);
}
}

@ -0,0 +1,27 @@
package com.aucma.report.mapper;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Mapper
*
* @Author YinQ
* @create 2023-10-26 10:53
*/
public interface GeneralReportMapper {
/**
*
* @param hashMap
* @return
*/
List<HashMap<String, Object>> inventoryRateReportList(Map hashMap);
}

@ -0,0 +1,24 @@
package com.aucma.report.service;
import com.aucma.report.domain.BasePdaRecord;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* PDAService
*
* @author Yinq
* @date 2023-11-21
*/
public interface IProductionReportService
{
/**
*
*/
List<HashMap<String, Object>> inventoryRateReportList(Map hashMap);
}

@ -0,0 +1,33 @@
package com.aucma.report.service.impl;
import com.aucma.report.domain.BasePdaRecord;
import com.aucma.report.mapper.GeneralReportMapper;
import com.aucma.report.service.IProductionReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* PDAService
*
* @author Yinq
* @date 2023-11-21
*/
@Service
public class ProductionReportServiceImpl implements IProductionReportService {
@Autowired
private GeneralReportMapper reportMapper;
/**
*
*/
@Override
public List<HashMap<String, Object>> inventoryRateReportList(Map hashMap) {
return reportMapper.inventoryRateReportList(hashMap);
}
}

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aucma.report.mapper.GeneralReportMapper">
<select id="inventoryRateReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT boi.ORDER_CODE,
boi.BEGIN_DATE,
boi.MATERIAL_CODE,
boi.MATERIAL_NAME,
boi.ORDER_AMOUNT,
NVL(boi.COMPLETE_AMOUNT, 0) COMPLETE_AMOUNT,
ROUND(NVL(boi.COMPLETE_AMOUNT, 0) / boi.ORDER_AMOUNT, 2) * 100 || '%' ORDER_RATE,
PL.WORK_CENTER_CODE,
PL.PRODUCT_LINE_NAME
FROM BASE_ORDERINFO boi
LEFT JOIN BASE_PRODUCTLINE PL ON PL.WORK_CENTER_CODE = boi.WORK_CENTER_CODE
WHERE boi.MATERIAL_CODE LIKE '90%'
<if test="WORK_CENTER_CODE != null and WORK_CENTER_CODE != ''">
AND boi.WORK_CENTER_CODE = #{WORK_CENTER_CODE}
</if>
<if test="MATERIAL_CODE != null and MATERIAL_CODE != ''">
and boi.MATERIAL_CODE like concat(#{MATERIAL_CODE}, '%')
</if>
<if test="MATERIAL_NAME != null and MATERIAL_NAME != ''">
and boi.MATERIAL_NAME like concat(concat('%',#{MATERIAL_NAME}), '%')
</if>
<if test="ORDER_CODE != null and ORDER_CODE != ''">
and boi.ORDER_CODE like concat(concat('%',#{ORDER_CODE}), '%')
</if>
<if test="beginBeginTime != null and beginBeginTime != '' and endBeginTime != null and endBeginTime != ''">
AND TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') BETWEEN #{beginBeginTime} AND #{endBeginTime}
</if>
ORDER BY ORDER_RATE
</select>
</mapper>
Loading…
Cancel
Save