Merge remote-tracking branch 'origin/master'

master
zpl 4 years ago
commit f3583fe8d5

@ -44,7 +44,8 @@
ZNU.FULL_NAME OPERATION_USER,ZSD.SFC SFC,
CASE WHEN S2.STATUS = '405' THEN '是' ELSE '否' END DISPATCH_STATUS,
ZSD.EARLIEST_START_DATE EARLIEST_START_DATE,ZSD.LATEST_END_DATE LATEST_END_DATE,
ZSD.ACTUAL_START_DATE ACTUAL_START_DATE,ZSD.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE
ZSD.ACTUAL_START_DATE ACTUAL_START_DATE,ZSD.ACTUAL_COMPLETE_DATE ACTUAL_COMPLETE_DATE,
CF2.VALUE WORK_ORDER
FROM SFC S
INNER JOIN SHOP_ORDER SO ON SO.HANDLE = S.SHOP_ORDER_BO
INNER JOIN ITEM I ON I.HANDLE = SO.ITEM_BO
@ -56,6 +57,7 @@
SELECT MAX(ZSD2.DISPATCH_SEQ) FROM Z_SFC_DISPATCH ZSD2 WHERE S.SFC = ZSD2.SFC AND S.SITE = ZSD2.SITE
)
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = S.SHOP_ORDER_BO AND CF."ATTRIBUTE" = 'ITEM_NUMBER'
LEFT JOIN CUSTOM_FIELDS CF2 ON CF2.HANDLE = S.SHOP_ORDER_BO AND CF2."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN STATUS S2 ON S2.HANDLE = S.STATUS_BO
<where>
S.SITE = #{site}
@ -72,6 +74,21 @@
<if test="param.itemDescription != null and param.itemDescription != ''">
AND IT.DESCRIPTION LIKE '%${param.itemDescription}%'
</if>
<if test="param.operation != null and param.operation != ''">
AND (O.OPERATION LIKE '%${param.operation}%'
OR OT.DESCRIPTION LIKE '%${param.operation}%')
</if>
<if test="param.workOrder != null and param.workOrder != ''">
AND CF2.VALUE = #{param.workOrder}
</if>
<if test="param.status != null and param.status != ''">
<if test="param.status == 'Y'.toString()">
AND S2.STATUS = '405'
</if>
<if test="param.status == 'N'.toString()">
AND S2.STATUS != '405'
</if>
</if>
<if test="param.startDateTime != null">
AND ZSD.ACTUAL_START_DATE &gt;= TO_DATE(#{param.startDateTime}, 'YYYY-MM-DD HH24:MI:SS')
</if>
@ -84,6 +101,7 @@
<if test="param.completeEndDateTime != null">
AND ZSD.ACTUAL_COMPLETE_DATE &lt;= TO_DATE(#{param.endDateTime}, 'YYYY-MM-DD HH24:MI:SS')
</if>
</if>
</where>
</select>

@ -1,22 +1,17 @@
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;
@ -32,7 +27,6 @@ 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
@ -55,7 +49,7 @@ public class ExportAspect {
String exportCode = "";
//-------------------------------------------------------------------------------------------------------------------
if (paramtes == null || args == null || args.length == 0) return joinPoint.proceed();
Boolean isDuoDuo = (args != null && args.length == 1) ? false : true;
Boolean isDuoDuo = (args != null && (args.length == 1 && args[0].getClass() != String.class)) ? false : true;
//-------------------------------------------------------------------------------------------------------------------
request.setCharacterEncoding("UTF-8");
//-------------------------------------------------------------------------------------------------------------------
@ -73,9 +67,12 @@ public class ExportAspect {
while (paramtes.hasMoreElements()) {
String param = paramtes.nextElement();
String value = request.getParameter(param);
if (param != null && param.equals("export")) export = true;
if (param != null && param.equals("exportCode")) exportCode = value;
if (param != null && param.equals("export")) {
export = true;
}
if (param != null && param.equals("exportCode")) {
exportCode = value;
}
paramMap.put(param, value);
}//while
args[0] = paramMap;

@ -132,4 +132,15 @@ public class ReportDataController {
}
}
@GetMapping("/userPassRate")
public R findUserPassRate(@RequestParam(required = false) Map paramMap) {
try {
paramMap.put("site", CommonMethods.getSite());
List<Map<String, Object>> result = reportDataService.findUserPassRate(paramMap);
return R.ok(result);
} catch (Exception e) {
return R.failed(e.getMessage());
}
}
}

@ -27,4 +27,6 @@ public interface ReportDataMapper {
List<Map<String, Object>> findCheckUserPassRate(Map paramMap);
List<Map<String, Object>> findUserPassRate(Map paramMap);
}

@ -47,4 +47,6 @@ public interface ReportDataService {
List<Map<String, Object>> findCheckUserPassRate(Map paramMap);
List<Map<String, Object>> findUserPassRate(Map paramMap);
}

@ -72,4 +72,9 @@ public class ReportDataServiceImpl implements ReportDataService{
public List<Map<String, Object>> findCheckUserPassRate(Map paramMap) {
return reportDataMapper.findCheckUserPassRate(paramMap);
}
@Override
public List<Map<String, Object>> findUserPassRate(Map paramMap) {
return reportDataMapper.findUserPassRate(paramMap);
}
}

@ -301,6 +301,8 @@
</if>
GROUP BY zit."RESULT",zit.sfc ,zit.OPERATION,zit.STEP_ID, zit.CREATED_DATE_TIME,zit.RESRCE,zab.NC_QTY, WT.DESCRIPTION,ZSD.DISPATCH_QTY
) GROUP BY DESCRIPTION, "MONTH"
ORDER BY DESCRIPTION,"MONTH"
</select>
<select id="findCheckUserPassRate" resultType="java.util.HashMap" parameterType="java.util.HashMap">
@ -317,7 +319,7 @@
JOIN WORK_CENTER WC ON WC.SITE = zit.SITE AND WC.WORK_CENTER = zit.WORK_CENTER
LEFT JOIN WORK_CENTER_T WT ON WT.WORK_CENTER_BO = WC.HANDLE AND WT.LOCALE = 'zh'
LEFT JOIN Z_ABNORMAL_BILL ZAB ON zit.SFC=ZAB.SFC AND zit.SITE=ZAB.SITE AND zit.STEP_ID=ZAB.STEP_ID AND zab."TYPE"='Z'
LEFT JOIN Z_NWA_USER ZNU ON ZNU.SITE = ZIT.SITE AND ZNU.USER_NAME = ZIT.MODIFY_USER
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZIT.MODIFY_USER
WHERE zit.SITE= #{site} AND zit.CATEGORY='P' AND zit.STATUS='COMPLETE'
<if test="workCenter != null and workCenter != ''" >
AND zit.WORK_CENTER = #{workCenter}
@ -328,7 +330,55 @@
<if test="startToDate != null and startToDate != ''" >
AND TO_CHAR(zit.CREATED_DATE_TIME,'YYYY-MM') &lt;= #{startToDate}
</if>
<if test="userId != null and userId != ''" >
AND ZIT.MODIFY_USER = #{userId}
</if>
GROUP BY zit."RESULT",zit.sfc ,zit.OPERATION,zit.STEP_ID, zit.CREATED_DATE_TIME,zit.RESRCE,zab.NC_QTY, ZNU.FULL_NAME,WT.DESCRIPTION
) GROUP BY DESCRIPTION, "MONTH",FULL_NAME
ORDER BY DESCRIPTION,"MONTH"
</select>
<select id="findUserPassRate" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT ZNU.FULL_NAME,DUTY_USER,DESCRIPTION WORK_CENTER_DESCRIPTION, "MONTH",sum(NG_QTY) NC_QTY, sum(OK_QTY) OK_QTY,sum(CHECK_QTY) CHECK_QTY,round(sum(OK_QTY)*100/sum(DISPATCH_QTY),2)||'% ' OK_RATE FROM
(
SELECT CASE WHEN ROW_NUMBER() OVER(PARTITION BY zit.sfc ,zit.OPERATION,zit.STEP_ID ORDER BY zit.CREATED_DATE_TIME DESC)=1 AND zit."RESULT"='OK' THEN 0
WHEN ROW_NUMBER() OVER(PARTITION BY zit.sfc ,zit.OPERATION,zit.STEP_ID ORDER BY zit.CREATED_DATE_TIME DESC)=1 AND zit."RESULT"='NG' THEN TO_NUMBER(zab.NC_QTY)
ELSE 0 END NG_QTY , TO_CHAR(zit.CREATED_DATE_TIME,'YYYY-MM') "MONTH",
CASE WHEN ROW_NUMBER() OVER(PARTITION BY zit.sfc ,zit.OPERATION,zit.STEP_ID ORDER BY zit.CREATED_DATE_TIME DESC)=1 AND zit."RESULT"='OK' THEN zsd.DISPATCH_QTY
WHEN ROW_NUMBER() OVER(PARTITION BY zit.sfc ,zit.OPERATION,zit.STEP_ID ORDER BY zit.CREATED_DATE_TIME DESC)=1 AND zit."RESULT"='NG' THEN 0
ELSE 0 END OK_QTY,E.EMPLOYEE,ZABD.DUTY_USER
,ZSD.DISPATCH_QTY, WT.DESCRIPTION,
ROW_NUMBER() OVER(PARTITION BY zit.sfc ,zit.OPERATION,zit.STEP_ID ORDER BY zit.CREATED_DATE_TIME DESC) seq,
zit."RESULT",COUNT(ZIT.HANDLE) check_qty, zit.sfc ,zit.OPERATION,zit.STEP_ID FROM Z_INSPECTION_TASK zit
JOIN sfc S ON S.SFC=zit.SFC AND s.SITE=zit.SITE
JOIN Z_SFC_DISPATCH ZSD ON ZSD.SFC=zit.SFC AND ZSD.SITE=zit.SITE AND zit.STEP_ID=ZSD.STEP_ID
JOIN WORK_CENTER WC ON WC.SITE = zit.SITE AND WC.WORK_CENTER = zit.WORK_CENTER
JOIN (
SELECT HANDLE,
REGEXP_SUBSTR(EMPLOYEE, '[^,]+', 1, l) AS EMPLOYEE
FROM Z_SFC_DISPATCH c,
(SELECT LEVEL l FROM DUAL CONNECT BY LEVEL &lt;= 5)
WHERE l &lt;= LENGTH(EMPLOYEE) - LENGTH(REPLACE(EMPLOYEE, ',')) + 1) E ON ZSD.HANDLE=E.HANDLE
LEFT JOIN WORK_CENTER_T WT ON WT.WORK_CENTER_BO = WC.HANDLE AND WT.LOCALE = 'zh'
LEFT JOIN Z_ABNORMAL_BILL ZAB ON zit.SFC=ZAB.SFC AND zit.SITE=ZAB.SITE AND zit.STEP_ID=ZAB.STEP_ID AND zab."TYPE"='Z'
LEFT JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZAB.HANDLE=ZABD.ABNORMAL_BILL_BO
WHERE zit.SITE= #{site} AND zit.CATEGORY='P' AND zit.STATUS='COMPLETE'
<if test="workCenter != null and workCenter != ''" >
AND zit.WORK_CENTER = #{workCenter}
</if>
<if test="startFromDate != null and startFromDate != ''" >
AND TO_CHAR(zit.CREATED_DATE_TIME,'YYYY-MM') >=#{startFromDate}
</if>
<if test="startToDate != null and startToDate != ''" >
AND TO_CHAR(zit.CREATED_DATE_TIME,'YYYY-MM') &lt;= #{startToDate}
</if>
<if test="userId != null and userId != ''" >
AND E.EMPLOYEE = #{userId}
</if>
GROUP BY zit."RESULT",zit.sfc ,zit.OPERATION,zit.STEP_ID, zit.CREATED_DATE_TIME,zit.RESRCE,zab.NC_QTY, WT.DESCRIPTION,ZSD.DISPATCH_QTY,E.EMPLOYEE,ZABD.DUTY_USER
) D
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = D.EMPLOYEE
GROUP BY DESCRIPTION, "MONTH",ZNU.FULL_NAME,DUTY_USER
ORDER BY DESCRIPTION,"MONTH"
</select>
</mapper>

@ -113,6 +113,6 @@ activeMq:
sendWeChatMessage: tcp://localhost:61616?wireFormat.maxInactivityDuration=0
queue: send.weChat.notice
exportDocument:
filePath: /Users/zhaojiawei/Desktop/青岛项目后台/mesnac5.biz/production/src/main/resources/
filePath: /Users/zhaojiawei/Desktop/青岛项目后台/mesnac6.biz/production/src/main/resources/
outputPath: /Users/zhaojiawei/Desktop/
template: scrap.ftl
template: SFC_SCRAP_TEMPLATE.ftl

@ -77,7 +77,7 @@ public class SfcController {
sfc.setSite(site);
QueryWrapper<SfcDto> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(sfc);
result = sfcService.pageByResrce(frontPage.getPagePlus(), queryWrapper);
result = sfcService.pageByResrce(frontPage.getPagePlus(), queryWrapper,frontPage.getGlobalQuery());
} catch (Exception e) {
return R.failed(e.getMessage());
}

@ -30,7 +30,7 @@ public interface SfcMapper extends BaseMapper<Sfc> {
SfcDto findSfcData(@Param("site") String site, @Param("sfc") String sfc);
IPage pageByResrce(Page<Sfc> pagePlus,@Param("ew") QueryWrapper<SfcDto> queryWrapper,@Param("locale")String locale);
IPage pageByResrce(Page<Sfc> pagePlus, @Param("ew") QueryWrapper<SfcDto> queryWrapper, @Param("locale") String locale, @Param("globalQuery") String globalQuery);
Map findOperationBySfc(@Param("site")String site, @Param("sfc")String sfc);

@ -21,7 +21,7 @@ import java.util.Map;
* @since 2021-06-02
*/
public interface SfcService extends IService<Sfc> {
IPage<Sfc> pageByResrce(Page<Sfc> pagePlus, QueryWrapper<SfcDto> queryWrapper);
IPage<Sfc> pageByResrce(Page<Sfc> pagePlus, QueryWrapper<SfcDto> queryWrapper, String globalQuery);
/**
*

@ -36,8 +36,8 @@ public class SfcServiceImpl extends ServiceImpl<SfcMapper, Sfc> implements SfcSe
private SfcMapper sfcMapper;
@Override
public IPage pageByResrce(Page<Sfc> pagePlus, QueryWrapper<SfcDto> queryWrapper) {
return sfcMapper.pageByResrce(pagePlus, queryWrapper, LocaleContextHolder.getLocale().getLanguage());
public IPage pageByResrce(Page<Sfc> pagePlus, QueryWrapper<SfcDto> queryWrapper, String globalQuery) {
return sfcMapper.pageByResrce(pagePlus, queryWrapper, LocaleContextHolder.getLocale().getLanguage(),globalQuery);
}
@Override

@ -682,6 +682,9 @@
WHERE S.SITE=#{ew.entity.site} AND ZSD.RESRCE=#{ew.entity.resrce} AND (ZSD.DISPATCH_STATUS='RELEASE' OR ZSD.DISPATCH_STATUS='START')
AND S.STATUS_BO IN ('StatusBO:'||#{ew.entity.site}||',401','StatusBO:'||#{ew.entity.site}||',402','StatusBO:'||#{ew.entity.site}||',403','StatusBO:'||#{ew.entity.site}||',404')
AND zprt.STATUS='FINISH' AND ZPRT."RESULT"='OK'
<if test="globalQuery!=null and globalQuery!=''">
AND S.SFC like '%${globalQuery}%'
</if>
</select>

@ -17,8 +17,8 @@ import java.util.List;
/**
*
* @author zjw
* @since 2021-07-30
* @author Leon.L
* @since 2021-09-07
*/
@RestController
@RequestMapping("/Z-SFC-SCRAP")
@ -30,8 +30,6 @@ public class SfcScrapController {
@Autowired
private AnomalyService anomalyService;
/**
* id
*
@ -83,6 +81,7 @@ public class SfcScrapController {
.or().like(SfcScrap::getReason, frontPage.getGlobalQuery())
.or().like(SfcScrap::getCreatedUser, frontPage.getGlobalQuery())
.or().like(SfcScrap::getModifiedUser, frontPage.getGlobalQuery())
.or().like(SfcScrap::getDutyUser, frontPage.getGlobalQuery())
);
}
result = sfcScrapService.page(frontPage.getPagePlus(), queryWrapper);
@ -168,19 +167,4 @@ public class SfcScrapController {
sfcScrapService.generatorWord(shopOrder,sfc,response,request);
return R.ok();
}
// @PostMapping("/import")
// public String importFile(@PathParam("shopOrder") String shopOrder,@PathParam("sfc")String sfc, @RequestParam("file") MultipartFile multipartFile) {
//
// //-----------------------------------------------------------------------------------------------------------------------------------------
// try {
// String transInfo = masterDataImportService.importFile(multipartFile, importRequest);
// return new APResult().getResult(0, transInfo, transInfo);
// } catch (Exception e) {
// e.printStackTrace();
// return new APResult().getResult(9999, e.getMessage(), e.getMessage());
// }
// }
}

@ -3,6 +3,7 @@ package com.foreverwin.mesnac.production.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.production.dto.WorkShopTransferDto;
import com.foreverwin.mesnac.production.mapper.WorkShopTransferMapper;
import com.foreverwin.mesnac.production.model.WorkShopTransfer;
import com.foreverwin.mesnac.production.service.WorkShopTransferService;
import com.foreverwin.modular.core.util.CommonMethods;
@ -24,7 +25,8 @@ public class WorkShopTransferController {
@Autowired
public WorkShopTransferService workShopTransferService;
@Autowired
public WorkShopTransferMapper workShopTransferMapper;
/**
*
*
@ -73,6 +75,29 @@ public class WorkShopTransferController {
workShopTransferService.transferIn(handleList);
return R.ok();
}
/**
*
*
* @param frontPage
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<WorkShopTransfer> frontPage, WorkShopTransfer workShopTransfer){
IPage result;
QueryWrapper<WorkShopTransfer> queryWrapper = new QueryWrapper<>();
workShopTransfer.setSite(CommonMethods.getSite());
queryWrapper.setEntity(workShopTransfer);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(WorkShopTransfer::getTransferNo, frontPage.getGlobalQuery())
);
}
result = workShopTransferService.page(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}
/**
* id
*
@ -107,8 +132,8 @@ public class WorkShopTransferController {
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<WorkShopTransfer> frontPage, WorkShopTransfer workShopTransfer){
@GetMapping("/transferNo")
public R getTransferNo(FrontPage<WorkShopTransfer> frontPage, WorkShopTransfer workShopTransfer){
IPage result;
QueryWrapper<WorkShopTransfer> queryWrapper = new QueryWrapper<>();
workShopTransfer.setSite(CommonMethods.getSite());
@ -119,7 +144,7 @@ public class WorkShopTransferController {
.like(WorkShopTransfer::getTransferNo, frontPage.getGlobalQuery())
);
}
result = workShopTransferService.page(frontPage.getPagePlus(), queryWrapper);
result = workShopTransferMapper.getTransferNo(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}

@ -1,5 +1,8 @@
package com.foreverwin.mesnac.production.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.foreverwin.mesnac.production.dto.WorkShopTransferDto;
import com.foreverwin.mesnac.production.model.WorkShopTransfer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -26,4 +29,5 @@ public interface WorkShopTransferMapper extends BaseMapper<WorkShopTransfer> {
List<WorkShopTransferDto> getInList(@Param("site") String site, @Param("workCenter") String workCenter,@Param("transferWorkCenter") String transferWorkCenter, @Param("transferNo") String transferNo, @Param("status") String status,@Param("sfc") String sfc);
IPage getTransferNo(Page<WorkShopTransfer> pagePlus, @Param("ew")QueryWrapper<WorkShopTransfer> queryWrapper);
}

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.common.enums.DispatchStatusEnum;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.service.SfcDispatchCommonService;
import com.foreverwin.mesnac.common.util.DateUtil;
import com.foreverwin.mesnac.common.util.ExceptionUtil;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.mapper.WorkCenterMapper;
@ -29,10 +30,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -138,9 +137,7 @@ public class WorkShopTransferServiceImpl extends ServiceImpl<WorkShopTransferMap
public List<WorkShopTransferDto> transferOut(String handleList) {
String site = CommonMethods.getSite();
String user = CommonMethods.getUser();
Date date = new Date(System.currentTimeMillis());
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");
String taskNo = dateFormat1.format(date);
String taskNo = DateUtil.getTimeString();
List<WorkShopTransferDto> returnList=new ArrayList<>();
String[] split = handleList.split(",");
for (String sfc:split){

@ -16,11 +16,12 @@
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFIED_USER" property="modifiedUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
<result column="DUTY_USER" property="dutyUser" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, SFC, OPERATION, STEP_ID, QTY, TYPE, REASON, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
HANDLE, SITE, SFC, OPERATION, STEP_ID, QTY, TYPE, REASON, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME, DUTY_USER
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -66,6 +67,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</where>
</select>
@ -88,6 +90,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -118,6 +121,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -148,6 +152,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -178,6 +183,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -208,6 +214,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -238,6 +245,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -264,6 +272,7 @@
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifiedUser!=null">MODIFIED_USER,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
<if test="dutyUser!=null">DUTY_USER,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
@ -278,6 +287,7 @@
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifiedUser!=null">#{modifiedUser},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
<if test="dutyUser!=null">#{dutyUser},</if>
</trim>
</insert>
@ -299,6 +309,7 @@
#{createdDateTime},
#{modifiedUser},
#{modifiedDateTime},
#{dutyUser},
</trim>
</insert>
@ -316,6 +327,7 @@
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.dutyUser!=null">DUTY_USER=#{et.dutyUser},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
@ -333,6 +345,7 @@
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFIED_USER=#{et.modifiedUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
DUTY_USER=#{et.dutyUser},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
@ -350,6 +363,7 @@
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.dutyUser!=null">DUTY_USER=#{et.dutyUser},</if>
</trim>
<where>
<if test="ew!=null">
@ -366,6 +380,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -413,6 +428,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.dutyUser!=null"> AND DUTY_USER=#{ew.entity.dutyUser}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -430,28 +446,30 @@
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="generatorWord" resultType="hashmap">
SELECT DISTINCT NVL(WCT.DESCRIPTION,' ') WORK_CENTER,NVL(WO.VALUE,' ') WORK_ORDER,NVL(WO2.VALUE,' ') DWG_NO,NVL(ZSS.QTY,0) QTY,NVL(OT.DESCRIPTION,' ') OPERATION,
NVL(ZSS.REASON,' ') REASON,NVL(ZSS."TYPE",' ') "TYPE",
CASE WHEN I1.VALUE != NULL THEN NVL(I1.VALUE * I.QTY_MULTIPLIER,0)
WHEN I2.VALUE != NULL THEN NVL(I2.VALUE * I.QTY_MULTIPLIER,0)
ELSE NVL(I.QTY_MULTIPLIER,0) END WEIGHT,NVL(I.ITEM,' ') ITEM,NVL(S.SFC,' ') SFC,NVL(it.DESCRIPTION,' ') ITEM_DESCRIPTION,
NVL(SO.SHOP_ORDER,' ') SHOP_ORDER,NVL(ZNU.FULL_NAME,' ') DUTY_USER
WHEN I2.VALUE != NULL THEN NVL(I2.VALUE * I.QTY_MULTIPLIER,0)
ELSE NVL(I.QTY_MULTIPLIER,0) END WEIGHT,NVL(I.ITEM,' ') ITEM,NVL(S.SFC,' ') SFC,NVL(it.DESCRIPTION,' ') ITEM_DESCRIPTION,
NVL(SO.SHOP_ORDER,' ') SHOP_ORDER,NVL(ZSS.DUTY_USER,' ') DUTY_USER
FROM
SHOP_ORDER SO
LEFT JOIN WORK_CENTER WC ON SO.PLANNED_WORK_CENTER_BO = WC.HANDLE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS WO ON WO.HANDLE = SO.HANDLE AND WO."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN SFC S ON S.SFC = #{sfc} AND S.SITE = #{site}
LEFT JOIN Z_SFC_SCRAP ZSS ON ZSS.SFC = S.SFC
LEFT JOIN OPERATION O ON O.OPERATION = ZSS.OPERATION AND O.SITE = SO.SITE
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = #{locale}
LEFT JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
LEFT JOIN CUSTOM_FIELDS WO2 ON WO2.HANDLE = I.HANDLE AND WO2."ATTRIBUTE" = 'DWG_NO'
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZSS.DUTY_USER
LEFT JOIN ITEM_T it ON it.ITEM_BO = I.HANDLE AND it.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS I1 ON I1.HANDLE = I.HANDLE AND I1."ATTRIBUTE" = 'PER_METER'
LEFT JOIN CUSTOM_FIELDS I2 ON I2.HANDLE = I.HANDLE AND I2."ATTRIBUTE" = 'PER_SQUARE_METER'
SHOP_ORDER SO
LEFT JOIN CUSTOM_FIELDS WO ON WO.HANDLE = SO.HANDLE AND WO."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN SFC S ON S.SFC = #{sfc} AND S.SITE = #{site}
LEFT JOIN Z_SFC_SCRAP ZSS ON ZSS.SFC = S.SFC
LEFT JOIN OPERATION O ON O.OPERATION = ZSS.OPERATION AND O.SITE = SO.SITE
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = #{locale}
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = SUBSTR(O.OPERATION,1,INSTR(O.OPERATION,'_')-1)
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
LEFT JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
LEFT JOIN CUSTOM_FIELDS WO2 ON WO2.HANDLE = I.HANDLE AND WO2."ATTRIBUTE" = 'DWG_NO'
LEFT JOIN ITEM_T it ON it.ITEM_BO = I.HANDLE AND it.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS I1 ON I1.HANDLE = I.HANDLE AND I1."ATTRIBUTE" = 'PER_METER'
LEFT JOIN CUSTOM_FIELDS I2 ON I2.HANDLE = I.HANDLE AND I2."ATTRIBUTE" = 'PER_SQUARE_METER'
WHERE SO.SHOP_ORDER = #{shopOrder}
</select>
</mapper>

@ -261,8 +261,26 @@
</if>
</select>
<select id="getTransferNo" resultMap="BaseResultMap">
SELECT DISTINCT TRANSFER_NO FROM Z_WORK_SHOP_TRANSFER
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
AND ${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_WORK_SHOP_TRANSFER
SELECT DISTINCT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_WORK_SHOP_TRANSFER
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
@ -643,7 +661,7 @@
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN OPERATION PREOP ON PREOP.OPERATION = zsd.PREPOSITION_OPERATION AND PREOP.SITE = ZSD.SITE AND PREOP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T PREOT ON PREOT.OPERATION_BO = PREOP.HANDLE AND PREOT.LOCALE ='zh'
WHERE ZSD.SITE=#{site} AND zsd.DISPATCH_STATUS!='COMPLETE' AND zsd.DISPATCH_STATUS!='CANCEL'
WHERE ZSD.SITE=#{site} AND (zsd.DISPATCH_STATUS='RELEASE' OR zsd.DISPATCH_STATUS='NEW') AND PREZSD.DISPATCH_STATUS='COMPLETE'
<if test="stepId!=null and stepId!=''">
AND zsd.STEP_ID=#{stepId}
</if>
@ -692,7 +710,7 @@
</select>
<select id="getInList" resultType="com.foreverwin.mesnac.production.dto.WorkShopTransferDto">
SELECT zsd.sfc,zsd.handle SFC_DISPATCH_BO,PREZSD.OPERATION NEXT_OPERATION,PREZSD.WORK_CENTER TRANSFER_WORK_CENTER,zsd.WORK_CENTER,WCT.DESCRIPTION WORK_CENTER_DESC,zsd.SHOP_ORDER,c1.VALUE WORK_ORDER,IT.DESCRIPTION ITEM_DESC,ZSD.BLANKING_SIZE,SFC.QTY,PREOT.DESCRIPTION LAST_OPERATION_DESC,PREZSD.EMPLOYEE_DESCRIPTION,OT.DESCRIPTION OPERATION_DESC,
SELECT zsd.sfc,zsd.handle SFC_DISPATCH_BO,zsd.WORK_CENTER,WCT.DESCRIPTION WORK_CENTER_DESC,zsd.SHOP_ORDER,c1.VALUE WORK_ORDER,IT.DESCRIPTION ITEM_DESC,ZSD.BLANKING_SIZE,SFC.QTY,PREOT.DESCRIPTION LAST_OPERATION_DESC,OT.DESCRIPTION OPERATION_DESC,
CASE WHEN ZWST.IS_IN='Y' THEN '已接收' WHEN ZWST.IS_OUT='Y' THEN '转序中' ELSE NULL END STATUS
FROM Z_SFC_DISPATCH zsd
JOIN sfc sfc ON sfc.sfc=zsd.sfc AND zsd.site=sfc.site
@ -701,7 +719,6 @@
left JOIN SFC_STEP SP ON SP.SFC_ROUTER_BO = SR.HANDLE and sp.step_Id=zsd.STEP_ID
JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZSD.WORK_CENTER AND WC.SITE = zsd.SITE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = 'zh'
LEFT JOIN Z_SFC_DISPATCH PREZSD ON zsd.SFC=PREZSD.SFC AND PREZSD.DISPATCH_SEQ=TO_NUMBER(zsd.DISPATCH_SEQ)+1
LEFT JOIN Z_WORK_SHOP_TRANSFER ZWST ON zsd.HANDLE=zwst.SFC_DISPATCH_BO
INNER JOIN SHOP_ORDER SO ON SO.SITE = zsd.SITE AND SO.SHOP_ORDER = zsd.SHOP_ORDER
JOIN OPERATION OP ON OP.OPERATION = zsd.OPERATION AND OP.SITE = ZSD.SITE AND OP.CURRENT_REVISION = 'true'
@ -712,11 +729,8 @@
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN OPERATION PREOP ON PREOP.OPERATION = zsd.PREPOSITION_OPERATION AND PREOP.SITE = ZSD.SITE AND PREOP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T PREOT ON PREOT.OPERATION_BO = PREOP.HANDLE AND PREOT.LOCALE ='zh'
WHERE ZSD.SITE=#{site} AND zsd.DISPATCH_STATUS!='COMPLETE' AND zsd.DISPATCH_STATUS!='CANCEL'
WHERE ZSD.SITE=#{site} AND (zsd.DISPATCH_STATUS='RELEASE' OR zsd.DISPATCH_STATUS='NEW')
AND ZSD.WORK_CENTER=#{workCenter}
<if test="transferWorkCenter!=null and transferWorkCenter!=''">
AND PREZSD.WORK_CENTER=#{transferWorkCenter}
</if>
<if test="transferNo!=null and transferNo!=''">
AND ZWST.TRANSFER_NO=#{transferNo}
</if>

@ -30,6 +30,7 @@ public class InspectionTaskManage implements Serializable {
private String modifyUser;
private LocalDateTime modifiedDateTime;
private String fullName;
private String resrceDescription;
private List<InspectionTaskManageDetail> inspectionTaskDetailList;
@ -224,4 +225,12 @@ public class InspectionTaskManage implements Serializable {
public void setFullName(String fullName) {
this.fullName = fullName;
}
public String getResrceDescription() {
return resrceDescription;
}
public void setResrceDescription(String resrceDescription) {
this.resrceDescription = resrceDescription;
}
}

@ -26,11 +26,12 @@
<result column="MODIFY_USER" property="modifyUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
<result column="FULL_NAME" property="fullName"/>
<result column="RESRCE_DESCRIPTION" property="resrceDescription"/>
</resultMap>
<select id="findInspectionTask" resultMap="BaseResultMap">
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
M.ITEM, Z.DESCRIPTION ITEM_DESCRIPTION,ZNU.FULL_NAME FULL_NAME,RS.DESCRIPTION RESRCE_DESCRIPTION
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'

Loading…
Cancel
Save