生产派工&甘特图&质量代办事项修改。

master
Leon 3 years ago
parent 76804709d8
commit 9aa3c013a4

@ -1,16 +1,22 @@
package com.foreverwin.mesnac.common.aspect;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.foreverwin.mesnac.common.export.ColumnConvert;
import com.foreverwin.mesnac.common.export.DateConvert;
import com.foreverwin.mesnac.common.model.ExportTemplate;
import com.foreverwin.mesnac.common.service.ExportTemplateService;
import com.foreverwin.mesnac.common.util.DateUtil;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.SpringUtil;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.lang.time.DateUtils;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.aspectj.lang.ProceedingJoinPoint;
@ -26,6 +32,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.*;
@Aspect
@ -67,7 +74,7 @@ public class ExportAspect {
}//for
//-------------------------------------------------------------------------------------------------------------------
Object result = joinPoint.proceed(args);
JSONObject resultJson = JSON.parseObject(JSON.toJSONString(result));
JSONObject resultJson = JSON.parseObject(JSON.toJSONStringWithDateFormat(result, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat));
if (resultJson.get("data") instanceof List) {
List dataList = (List)resultJson.get("data");
exportData(exportCode, dataList, request, attributes.getResponse());

@ -4,8 +4,11 @@
<select id="findInspectionTask" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT WT.DESCRIPTION WORK_CENTER_DESCRIPTION, C2.VALUE ITEM_NUMBER, C3.VALUE PRODUCT_MODEL,IM.ITEM ITEM, IT.DESCRIPTION ITEM_DESCRIPTION,
ZT.SFC, ZT.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, ZT.RESRCE, RS.DESCRIPTION RESOURCE_DESCRIPTION, ZT.TASK_NO, ZT.CATEGORY,
ZT."RESULT", ZT.CREATE_USER, ZNU.FULL_NAME, ZT.MODIFIED_DATE_TIME
ZT.SFC, ZT.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, ZT.RESRCE, RS.DESCRIPTION RESOURCE_DESCRIPTION, ZT.TASK_NO, ZT.CATEGORY,
ZT."RESULT", ZT.CREATE_USER, ZNU.FULL_NAME, ZT.MODIFIED_DATE_TIME, ROWNUM SEQ,
CASE WHEN ZT."RESULT" = 'OK' THEN N'合格' WHEN ZT."RESULT" = 'NG' THEN N'不合格' ELSE N'--' END RESULT_DESC,
CASE WHEN ZT.CATEGORY = 'S' THEN N'首检' WHEN ZT.CATEGORY = 'Z' THEN N'自检'
WHEN ZT.CATEGORY = 'H' THEN N'互检' WHEN ZT.CATEGORY = 'P' THEN N'专检' ELSE N'--' END CATEGORY_DESC
FROM Z_INSPECTION_TASK ZT
LEFT JOIN WORK_CENTER WC ON WC.SITE = ZT.SITE AND WC.WORK_CENTER = ZT.WORK_CENTER
LEFT JOIN WORK_CENTER_T WT ON WT.WORK_CENTER_BO = WC.HANDLE AND WT.LOCALE = 'zh'

@ -66,7 +66,7 @@ ws:
#quartz任务启用
quartz:
enabled: true
enabled: false
#打印服务器配置
print:

@ -11,11 +11,13 @@ public class InspectionTaskManageRequest implements Serializable {
private String category;
private String status;
private String workCenter;
private String resrce;
private String shopOrder;
private String sfc;
private String item;
private String operation;
private String stepId;
private String checkUser;
private String dateFromStr;
private String dateToStr;
private Date dateFrom;
@ -69,6 +71,14 @@ public class InspectionTaskManageRequest implements Serializable {
this.workCenter = workCenter;
}
public String getResrce() {
return resrce;
}
public void setResrce(String resrce) {
this.resrce = resrce;
}
public String getShopOrder() {
return shopOrder;
}
@ -109,6 +119,14 @@ public class InspectionTaskManageRequest implements Serializable {
this.stepId = stepId;
}
public String getCheckUser() {
return checkUser;
}
public void setCheckUser(String checkUser) {
this.checkUser = checkUser;
}
public String getDateFromStr() {
return dateFromStr;
}

@ -32,6 +32,8 @@
SELECT B.HANDLE, B.SITE, B.CATEGORY, B.TASK_NO, B.DESCRIPTION, B.STATUS, B.INSPECTION_ITEM_BO, B.WORK_CENTER, B.SHOP_ORDER, B.SFC, B.OPERATION, B.STEP_ID, B.RESRCE, B.RESULT, B.COMMENTS, B.CREATE_USER, B.CREATED_DATE_TIME, B.MODIFY_USER, B.MODIFIED_DATE_TIME,
M.ITEM, Z.DESCRIPTION ITEM_DESCRIPTION,ZNU.FULL_NAME FULL_NAME
FROM Z_INSPECTION_TASK B
INNER JOIN RESRCE RS ON B.SITE = RS.SITE AND RS.RESRCE = B.RESRCE
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = RS.HANDLE AND CF.ATTRIBUTE = 'CHECK_USR'
INNER JOIN SFC S ON S.SITE = B.SITE AND S.SFC = B.SFC
INNER JOIN SHOP_ORDER P ON P.HANDLE = S.SHOP_ORDER_BO
INNER JOIN ITEM M ON M.HANDLE = P.ITEM_BO
@ -41,6 +43,12 @@
<if test="workCenter != null and workCenter != ''">
AND B.WORK_CENTER = #{workCenter}
</if>
<if test="resrce != null and resrce != ''">
AND B.RESRCE = #{resrce}
</if>
<if test="checkUser != null and checkUser != ''">
AND CF.VALUE = #{checkUser}
</if>
<choose>
<when test="category != null and category != ''">
AND B.CATEGORY = #{category}

@ -22,7 +22,7 @@ public class ResourceInspectTaskJob implements Job {
private static final String SITE_UPPERCASE = "SITE";
private static final String SITE_LOWERCASE = "site";
private Logger logger = LoggerFactory.getLogger("ResourceInspectTaskJob");
private Logger logger = LoggerFactory.getLogger(ResourceInspectTaskJob.class);
@Autowired
private ResourceInspectTaskJobService resourceInspectTaskJobService;

Loading…
Cancel
Save