配置文件增加打印地址

Leon 4 years ago
parent ee130d7cc9
commit bb17f7e1ab

@ -162,6 +162,10 @@ public class SfcDispatchDto implements Serializable{
* -
*/
private String workOrder;
/**
* -
*/
private String itemNumber;
/**
*
*/
@ -532,6 +536,14 @@ public class SfcDispatchDto implements Serializable{
this.workOrder = workOrder;
}
public String getItemNumber() {
return itemNumber;
}
public void setItemNumber(String itemNumber) {
this.itemNumber = itemNumber;
}
public String getComponent() {
return component;
}

@ -31,3 +31,7 @@ ftp:
username: zjw
password: zhaojiawei
#打印服务器配置
print:
server: http://localhost:8080/CodeSoftPrintWeb/printService

@ -1,5 +1,6 @@
package com.foreverwin.mesnac.dispatch.controller;
import cn.hutool.core.date.DateUtil;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.dispatch.dto.IssueItemDto;
import com.foreverwin.modular.core.exception.BusinessException;
@ -41,6 +42,12 @@ public class CallItemController {
List<CallItem> result;
try {
callItem.setSite(CommonMethods.getSite());
if (callItem.getStartFromDate_S() != null) {
callItem.setStartFromDate(DateUtil.parse(callItem.getStartFromDate_S()));
}
if (callItem.getStartToDate_S() != null) {
callItem.setStartToDate(DateUtil.parse(callItem.getStartToDate_S()));
}
result = callItemService.findCallItemList(callItem);
} catch (Exception e) {
return R.failed(e.getMessage());
@ -61,6 +68,12 @@ public class CallItemController {
List<CallItem> result;
try {
callItem.setSite(CommonMethods.getSite());
if (callItem.getStartFromDate_S() != null) {
callItem.setStartFromDate(DateUtil.parse(callItem.getStartFromDate_S()));
}
if (callItem.getStartToDate_S() != null) {
callItem.setStartToDate(DateUtil.parse(callItem.getStartToDate_S()));
}
result = callItemService.findCallItemDetailList(callItem);
} catch (Exception e) {
return R.failed(e.getMessage());

@ -10,6 +10,8 @@ import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
/**
@ -150,6 +152,8 @@ public class CallItem extends Model<CallItem> {
@TableField(exist = false)
private String workOrder;
@TableField(exist = false)
private String itemNumber;
@TableField(exist = false)
private String workCenter;
@TableField(exist = false)
private String dispatchNo;
@ -165,6 +169,22 @@ public class CallItem extends Model<CallItem> {
private LocalDateTime plannedStartDate;
@TableField(exist = false)
private String remark;
@TableField(exist = false)
private String startFromDate_S;
@TableField(exist = false)
private String startToDate_S;
@TableField(exist = false)
private Date startFromDate;
@TableField(exist = false)
private Date startToDate;
@TableField(exist = false)
private String requireFromDate_S;
@TableField(exist = false)
private String requireToDate_S;
@TableField(exist = false)
private Date requireFromDate;
@TableField(exist = false)
private Date requireToDate;
public String getHandle() {
return handle;
@ -398,6 +418,14 @@ public class CallItem extends Model<CallItem> {
this.workOrder = workOrder;
}
public String getItemNumber() {
return itemNumber;
}
public void setItemNumber(String itemNumber) {
this.itemNumber = itemNumber;
}
public String getWorkCenter() {
return workCenter;
}
@ -462,6 +490,70 @@ public class CallItem extends Model<CallItem> {
this.remark = remark;
}
public String getStartFromDate_S() {
return startFromDate_S;
}
public void setStartFromDate_S(String startFromDate_S) {
this.startFromDate_S = startFromDate_S;
}
public String getStartToDate_S() {
return startToDate_S;
}
public void setStartToDate_S(String startToDate_S) {
this.startToDate_S = startToDate_S;
}
public Date getStartFromDate() {
return startFromDate;
}
public void setStartFromDate(Date startFromDate) {
this.startFromDate = startFromDate;
}
public Date getStartToDate() {
return startToDate;
}
public void setStartToDate(Date startToDate) {
this.startToDate = startToDate;
}
public String getRequireFromDate_S() {
return requireFromDate_S;
}
public void setRequireFromDate_S(String requireFromDate_S) {
this.requireFromDate_S = requireFromDate_S;
}
public String getRequireToDate_S() {
return requireToDate_S;
}
public void setRequireToDate_S(String requireToDate_S) {
this.requireToDate_S = requireToDate_S;
}
public Date getRequireFromDate() {
return requireFromDate;
}
public void setRequireFromDate(Date requireFromDate) {
this.requireFromDate = requireFromDate;
}
public Date getRequireToDate() {
return requireToDate;
}
public void setRequireToDate(Date requireToDate) {
this.requireToDate = requireToDate;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";

@ -34,6 +34,7 @@
<result column="EMPLOYEE" property="employee" />
<result column="SOURCE_RESOURCE" property="sourceResource" />
<result column="WORK_ORDER" property="workOrder" />
<result column="ITEM_NUMBER" property="itemNumber" />
<result column="WORK_CENTER" property="workCenter" />
<result column="DISPATCH_NO" property="dispatchNo" />
<result column="DISPATCH_QTY" property="dispatchQty" />
@ -629,54 +630,71 @@
</select>
<select id="findCallItemList" resultMap="FullResultMap">
SELECT ZCI.HANDLE, ZCI.SITE, CF.VALUE WORK_ORDER, ZSD.WORK_CENTER, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, IT.ITEM, ITT.DESCRIPTION ITEM_DESCRIPTION, ZSD.BLANKING_SIZE,
ZSD.STEP_ID, ZCI.SFC_DISPATCH_BO, ZSD.DISPATCH_STATUS, ZCI.OPERATION, OPT.DESCRIPTION OPERATION_DESCRIPTION, ZSD.RESOURCE_TYPE, ZCI.RESRCE, ZSD.DISPATCH_QTY, ZSD.PLANNED_START_DATE, ZSD.REMARK,
CASE WHEN VP.NEWS = '1' AND VP.CALLES = '0' AND VP.ISSUED = '0' THEN N'未叫料'
WHEN VP.NEWS = '0' AND (VP.CALLES = '1' OR VP.ISSUED = '1') THEN N'全部推送'
ELSE N'部分推送' END CALL_STATUS,
CASE WHEN (VP.NEWS = '1' OR VP.CALLES = '1') AND VP.ISSUED = '0' THEN N'未发料'
WHEN VP.NEWS = '0' AND VP.CALLES = '0' AND VP.ISSUED = '1' THEN N'发料完成'
ELSE N'部分发料' END ISSUE_STATUS
FROM Z_SFC_DISPATCH ZSD
INNER JOIN Z_CALL_ITEM ZCI ON ZCI.SFC_DISPATCH_BO = ZSD.HANDLE
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE AND ZSD.SHOP_ORDER = SO.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF.ATTRIBUTE = 'WORK_ORDER'
INNER JOIN ITEM IT ON IT.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T ITT ON ITT.ITEM_BO = IT.HANDLE AND ITT.LOCALE = 'zh'
INNER JOIN OPERATION OP ON OP.SITE = ZCI.SITE AND OP.OPERATION = ZCI.OPERATION AND OP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OPT ON OPT.OPERATION_BO = OP.HANDLE AND OPT.LOCALE = 'zh'
LEFT JOIN (
SELECT SFC_DISPATCH_BO,
MAX(DECODE(STATUS, '801', '1', '0')) NEWS,
MAX(DECODE(STATUS, '802', '1', '0')) CALLES,
MAX(DECODE(STATUS, '803', '1', '0')) ISSUED,
MAX(DECODE(STATUS, '804', '1', '0')) CANCELED
FROM Z_CALL_ITEM
GROUP BY SFC_DISPATCH_BO
) VP ON VP.SFC_DISPATCH_BO = ZCI.SFC_DISPATCH_BO
WHERE ZSD.SITE = #{site}
<if test="workCenter != null and workCenter != ''">
AND ZSD.WORK_CENTER = #{workCenter}
</if>
<if test="dispatchStatus != null and dispatchStatus != ''">
AND ZSD.DISPATCH_STATUS = #{dispatchStatus}
</if>
<if test="workOrder != null and workOrder != ''">
AND CF.VALUE LIKE '%' ||#{workOrder}|| '%'
</if>
<if test="shopOrder != null and shopOrder != ''">
AND SO.SHOP_ORDER = #{shopOrder}
</if>
<if test="resourceType != null and resourceType != ''">
AND ZSD.RESOURCE_TYPE = #{resourceType}
SELECT *
FROM (
SELECT ZCI.SITE, CF.VALUE WORK_ORDER, CS.VALUE ITEM_NUMBER, ZSD.WORK_CENTER, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, IT.ITEM, ITT.DESCRIPTION ITEM_DESCRIPTION, ZSD.BLANKING_SIZE,
ZSD.STEP_ID, ZCI.SFC_DISPATCH_BO, ZSD.DISPATCH_STATUS, ZCI.OPERATION, OPT.DESCRIPTION OPERATION_DESCRIPTION, ZSD.RESOURCE_TYPE, ZCI.RESRCE, ZSD.DISPATCH_QTY, ZSD.PLANNED_START_DATE, ZSD.REMARK,
CASE WHEN VP.NEWS = '1' AND VP.CALLES = '0' AND VP.ISSUED = '0' THEN 'NONE'
WHEN VP.NEWS = '0' AND (VP.CALLES = '1' OR VP.ISSUED = '1') THEN 'ALL'
ELSE 'PART' END CALL_STATUS,
CASE WHEN (VP.NEWS = '1' OR VP.CALLES = '1') AND VP.ISSUED = '0' THEN 'NONE'
WHEN VP.NEWS = '0' AND VP.CALLES = '0' AND VP.ISSUED = '1' THEN 'ALL'
ELSE 'ALL' END ISSUE_STATUS
FROM Z_SFC_DISPATCH ZSD
INNER JOIN Z_CALL_ITEM ZCI ON ZCI.SFC_DISPATCH_BO = ZSD.HANDLE
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE AND ZSD.SHOP_ORDER = SO.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF.ATTRIBUTE = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS CS ON CS.HANDLE = SO.HANDLE AND CS.ATTRIBUTE = 'ITEM_NUMBER'
INNER JOIN ITEM IT ON IT.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T ITT ON ITT.ITEM_BO = IT.HANDLE AND ITT.LOCALE = 'zh'
INNER JOIN OPERATION OP ON OP.SITE = ZCI.SITE AND OP.OPERATION = ZCI.OPERATION AND OP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OPT ON OPT.OPERATION_BO = OP.HANDLE AND OPT.LOCALE = 'zh'
LEFT JOIN (
SELECT SFC_DISPATCH_BO,
MAX(DECODE(STATUS, '801', '1', '0')) NEWS,
MAX(DECODE(STATUS, '802', '1', '0')) CALLES,
MAX(DECODE(STATUS, '803', '1', '0')) ISSUED,
MAX(DECODE(STATUS, '804', '1', '0')) CANCELED
FROM Z_CALL_ITEM
GROUP BY SFC_DISPATCH_BO
) VP ON VP.SFC_DISPATCH_BO = ZCI.SFC_DISPATCH_BO
WHERE ZSD.SITE = #{site}
<if test="workCenter != null and workCenter != ''">
AND ZSD.WORK_CENTER = #{workCenter}
</if>
<if test="dispatchStatus != null and dispatchStatus != ''">
AND ZSD.DISPATCH_STATUS = #{dispatchStatus}
</if>
<if test="workOrder != null and workOrder != ''">
AND CF.VALUE LIKE '%' ||#{workOrder}|| '%'
</if>
<if test="shopOrder != null and shopOrder != ''">
AND SO.SHOP_ORDER = #{shopOrder}
</if>
<if test="resourceType != null and resourceType != ''">
AND ZSD.RESOURCE_TYPE = #{resourceType}
</if>
<if test="resrce != null and resrce != ''">
AND ZCI.RESRCE = #{resrce}
</if>
<if test="startFromDate != null">
AND ZSD.PLANNED_START_DATE >= #{startFromDate}
</if>
<if test="startToDate != null">
AND ZSD.PLANNED_START_DATE &lt;= #{startToDate}
</if>
GROUP BY ZCI.SITE, CF.VALUE, CS.VALUE, ZSD.WORK_CENTER, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, IT.ITEM, ITT.DESCRIPTION, ZSD.BLANKING_SIZE,
ZSD.STEP_ID, ZCI.SFC_DISPATCH_BO, ZSD.DISPATCH_STATUS, ZCI.OPERATION, OPT.DESCRIPTION, ZSD.RESOURCE_TYPE, ZCI.RESRCE, ZSD.DISPATCH_QTY, ZSD.PLANNED_START_DATE, ZSD.REMARK,
VP.NEWS, VP.CALLES, VP.ISSUED, VP.CANCELED
)
WHERE 1= 1
<if test="callStatus != null and callStatus != ''">
AND CALL_STATUS = #{callStatus}
</if>
<if test="resrce != null and resrce != ''">
AND ZCI.RESRCE = #{resrce}
<if test="issueStatus != null and issueStatus != ''">
AND ISSUE_STATUS = #{issueStatus}
</if>
GROUP BY ZCI.HANDLE, ZCI.SITE, CF.VALUE, ZSD.WORK_CENTER, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, IT.ITEM, ITT.DESCRIPTION, ZSD.BLANKING_SIZE,
ZSD.STEP_ID, ZCI.SFC_DISPATCH_BO, ZSD.DISPATCH_STATUS, ZCI.OPERATION, OPT.DESCRIPTION, ZSD.RESOURCE_TYPE, ZCI.RESRCE, ZSD.DISPATCH_QTY, ZSD.PLANNED_START_DATE, ZSD.REMARK,
VP.NEWS, VP.CALLES, VP.ISSUED, VP.CANCELED
ORDER BY ZSD.SFC, ZSD.STEP_ID
ORDER BY SFC, STEP_ID
</select>
<select id="findCallItemDetailList" resultMap="FullResultMap">
@ -742,6 +760,18 @@
<if test="callType != null and callType != ''" >
AND ZCI.CALL_TYPE = #{callType}
</if>
<if test="startFromDate != null">
AND ZSD.PLANNED_START_DATE >= #{startFromDate}
</if>
<if test="startToDate != null">
AND ZSD.PLANNED_START_DATE &lt;= #{startToDate}
</if>
<if test="requireFromDate != null">
AND ZCI.REQUIRED_DATE_TIME >= #{requireFromDate}
</if>
<if test="requireToDate != null">
AND ZCI.REQUIRED_DATE_TIME &lt;= #{requireToDate}
</if>
ORDER BY ZSD.SFC, ZSD.STEP_ID, ZCI.CALL_TYPE
</select>

Loading…
Cancel
Save