change - 看板接口

master
yinq 10 months ago
parent dcf0215b92
commit 36cbbad249

@ -203,24 +203,22 @@ public class SAPPutStorageServiceImpl implements ISAPPutStorageService {
} else {
//更新SAP计划
BaseOrderInfo baseOrderInfo = baseOrderInfos.get(0);
if (baseOrderInfo.getIsRelease() == 0) {
//SAP计划已下达到生产计划工位不更新数据
continue;
}
baseOrderInfo.setOrderStatus(map.get("STTXT"));
baseOrderInfo.setSaleOrderCode(map.get("KDAUF"));
baseOrderInfo.setMaterialName(map.get("MAKTX"));
baseOrderInfo.setOrderType(map.get("AUART"));
if (baseOrderInfo.getIsRelease() == 1) {
//SAP计划已下达到生产计划工位不更新数量
if (!map.get("GAMNG").equals(null)) {
baseOrderInfo.setOrderAmount(new BigDecimal(map.get("GAMNG")));
}
}
baseOrderInfo.setWorkCenterCode(map.get("ARBPL"));
baseOrderInfo.setRoutingCode(map.get("AUFPL"));
baseOrderInfo.setBeginDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GSTRP")));
baseOrderInfo.setEndDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GLTRP")));
baseOrderInfoService.updateBaseOrderInfo(baseOrderInfo);
baseOrderInfoList.add(baseOrderInfo);
// 同步生产日历
CalendarInfo calendar = new CalendarInfo();
calendar.setSapPlanCode(baseOrderInfo.getOrderCode());

@ -175,6 +175,8 @@
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="completeDate != null">complete_date = #{completeDate},</if>
<if test="workCenterCode != null">work_center_code = #{workCenterCode},</if>
<if test="routingCode != null">routing_code = #{routingCode},</if>
</trim>
where obj_id = #{objId}
</update>

@ -82,7 +82,7 @@
GROUP BY ANCESTORS)
</if>
</where>
order by bb.created_time desc
order by bb.material_type, bb.created_time desc
</select>
<select id="selectBaseBomInfoByObjId" parameterType="Long" resultMap="BaseBomInfoResult">

@ -37,6 +37,16 @@ public class BoardReportController extends BaseController {
return AjaxResult.success(boardReportService.generalInterfaceList(paramMap));
}
/**
* -
* @param paramMap
* @return
*/
@PostMapping("/boxFoamingProductionInterface")
public AjaxResult boxFoamingProductionInterface(@RequestBody HashMap<String, String> paramMap) {
return AjaxResult.success(boardReportService.boxFoamingProductionInterface(paramMap));
}
/**
*

@ -72,6 +72,19 @@ public class ReportRepairMeasures extends BaseEntity {
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
/**
* (1=;2=)
*/
private String userPermission;
public String getUserPermission() {
return userPermission;
}
public void setUserPermission(String userPermission) {
this.userPermission = userPermission;
}
public void setObjId(Long objId) {
this.objId = objId;
}

@ -48,4 +48,11 @@ public interface BoardReportMapper {
* @return
*/
List<HashMap<String, Object>> homePieChartInterface(HashMap<String, String> paramMap);
/**
* -
* @param paramMap
* @return
*/
List<HashMap<String, Object>> boxFoamingProductionInterface(HashMap<String, String> paramMap);
}

@ -28,4 +28,11 @@ public interface IBoardReportService {
*/
HashMap<String, Object> homePageInterface(HashMap<String, String> paramMap);
/**
* -
* @param paramMap
* @return
*/
List<HashMap<String, Object>> boxFoamingProductionInterface(HashMap<String, String> paramMap);
}

@ -51,6 +51,9 @@ public class BoardReportServiceImpl implements IBoardReportService {
Long planProductSum = 0L;
Long compProductSum = 0L;
for (HashMap<String, Object> map : todayOrderList) {
if (Integer.parseInt(String.valueOf(map.get("STATUS"))) != 0){
continue;
}
planOrderSum++;
if (Integer.parseInt(String.valueOf(map.get("COMPLETE_AMOUNT"))) > 0) {
prodOrderSum++;
@ -78,4 +81,15 @@ public class BoardReportServiceImpl implements IBoardReportService {
}
/**
* -
* @param paramMap
* @return
*/
@Override
public List<HashMap<String, Object>> boxFoamingProductionInterface(HashMap<String, String> paramMap) {
return boardReportMapper.boxFoamingProductionInterface(paramMap);
}
}

@ -6,25 +6,32 @@
<select id="generalInterfaceList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT * FROM TABLE (${method})
SELECT *
FROM TABLE(${method})
</select>
<select id="homePageInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
select ROWNUM ROWSEQ,
select bi.OBJ_ID,
ROWNUM ROWSEQ,
boi.FACTORY_CODE,
bi.PRODUCT_LINE_NAME,
boi.ORDER_CODE,
boi.SALEORDER_CODE,
boi.MATERIAL_CODE,
boi.MATERIAL_NAME,
TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') PLAN_CODE,
CASE
WHEN TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD') THEN 0
ELSE 1 END STATUS,
boi.ORDER_AMOUNT,
boi.COMPLETE_AMOUNT,
ROUND(boi.COMPLETE_AMOUNT / boi.ORDER_AMOUNT * 100, 0) || '%' RATE
from BASE_ORDERINFO boi
JOIN BASE_MATERIALINFO bm ON bm.MATERIAL_CODE = boi.material_code AND bm.DISPO IN ('100')
left join BASE_PRODUCTLINE bi ON bi.WORK_CENTER_CODE = boi.WORK_CENTER_CODE
WHERE TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
ORDER BY RATE
WHERE TO_CHAR(SYSDATE, 'YYYY-MM-DD') >= TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD')
AND TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') >= TO_CHAR(SYSDATE - 7, 'YYYY-MM-DD')
ORDER BY boi.BEGIN_DATE DESC
</select>
<select id="homeColumnarInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') BEGIN_DATE,
@ -47,11 +54,39 @@
ORDER BY BEGIN_DATE
</select>
<select id="homePieChartInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT QUALITY_DEFECT_NAME,COUNT(*) SUM FROM
SELECT QUALITY_DEFECT_NAME, COUNT(*) SUM
FROM
REPORT_QUALITY_INSPECTION
WHERE QUALITY_DEFECT_NAME IS NOT NULL
GROUP BY QUALITY_DEFECT_NAME
</select>
<select id="boxFoamingProductionInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT BD.SORT EQUIPMENT_CODE,
VBF.FIXTUREBOXTYPE,
CASE WHEN VBF.FIXTURESTATUS = 1 THEN '生产中' ELSE '停用中' END FIXTURESTATUS,
TO_NUMBER(BCD.CUSTOM_DATA) TARGET,
VBF.ORDER_CODE,
VBF.PRODUCTION PRO_SUM,
VBF.ANHOUR,
VBF.TWOHOUR,
VBF.THREEHOUR,
VBF.FOURHOUR,
VBF.FIVEHOUR,
VBF.SIXHOUR,
VBF.SEVENHOUR,
VBF.EIGHTHOUR,
VBF.NINEHOUR,
VBF.TENHOUR,
VBF.ELEVENHOUR,
VBF.TWELVEHOUR,
VBF.ACTUALVALUE,
TO_CHAR(VBF.UPDATETIME, 'YYYY-MM-DD HH24:MI:SS') UPDATETIME
FROM VIEW_BOX_FOAMDATA VBF
LEFT JOIN VIEW_BOX_DEVICEINFO BD ON BD.OBJ_ID = VBF.MAINID
LEFT JOIN BASE_CUSTOM_DATA BCD ON BCD.CUSTOM_CODE = 'XTFP_TARGET'
WHERE VBF.PRODUCT_LINE_CODE = 'CX_01'
ORDER BY BD.SORT
</select>
</mapper>

@ -14,6 +14,7 @@
<result property="createdTime" column="created_time"/>
<result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time"/>
<result property="userPermission" column="user_permission"/>
</resultMap>
<sql id="selectReportRepairMeasuresVo">
@ -25,7 +26,8 @@
created_by,
created_time,
updated_by,
updated_time
updated_time,
user_permission
from report_repair_measures
</sql>
@ -43,6 +45,7 @@
<if test="createdTime != null ">and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
<if test="userPermission != null and userPermission != '2'">and user_permission = #{userPermission}</if>
</where>
order by repair_code
</select>

Loading…
Cancel
Save