Merge remote-tracking branch 'mesnac/master'

master
Leon 3 years ago
commit b6ae2ad2b4

@ -942,9 +942,18 @@
<if test="abnormalBill.abnormalNo != null and abnormalBill.abnormalNo != ''">
AND zab.ABNORMAL_NO = #{abnormalBill.abnormalNo}
</if>
<if test="abnormalBill.status != null and abnormalBill.status != ''">
<if test="abnormalBill.status != null and abnormalBill.status != '' and abnormalBill.status != 'COMP'.toString()">
AND zab.STATUS = #{abnormalBill.status}
</if>
<if test="abnormalBill.status == 'J'.toString()">
AND zab.PROGRAM IS NULL
</if>
<if test="abnormalBill.status == 'F'.toString()">
AND zab.CORRECTION IS NULL
</if>
<if test="abnormalBill.status == 'COMP'.toString()">
AND zab.PROGRAM = 'true' AND zab.CORRECTION = 'true' AND zab.status != 'G'
</if>
<if test="abnormalBill.startDateTime != null ">
AND zab.CREATED_DATE_TIME &gt;= #{abnormalBill.startDateTime}
</if>

@ -38,4 +38,56 @@ public class ReportDataController {
return R.failed(e.getMessage());
}
}
/**
*
*
* @param paramMap
* @return
*/
@GetMapping("/findResourceLoadRateInfo")
public R findResourceLoadRateInfo(@RequestParam(required = false) Map paramMap) {
try {
paramMap.put("site", CommonMethods.getSite());
List<Map<String, Object>> result = reportDataService.findResourceLoadRateInfo(paramMap);
return R.ok(result);
} catch (Exception e) {
return R.failed(e.getMessage());
}
}
/**
*
*
* @param paramMap
* @return
*/
@GetMapping("/findResourceRepairDataStatInfo")
public R findResourceRepairDataStatInfo(@RequestParam(required = false) Map paramMap) {
try {
paramMap.put("site", CommonMethods.getSite());
List<Map<String, Object>> result = reportDataService.findResourceRepairDataStatInfo(paramMap);
return R.ok(result);
} catch (Exception e) {
return R.failed(e.getMessage());
}
}
/**
*
*
* @param paramMap
* @return
*/
@GetMapping("/findProductStateInfo")
public R findProductStateInfo(@RequestParam(required = false) Map paramMap) {
try {
paramMap.put("site", CommonMethods.getSite());
List<Map<String, Object>> result = reportDataService.findProductStateInfo(paramMap);
return R.ok(result);
} catch (Exception e) {
return R.failed(e.getMessage());
}
}
}

@ -24,4 +24,10 @@ public interface InspectionItemMapper extends BaseMapper<InspectionItem> {
List<InspectionItemDetail> selectWidestQualityInspection(@Param("site")String site,@Param("inspectionType")String inspectionType,@Param("additionalObject")String additionalObject);
Integer checkRouterStep(@Param("site")String site,@Param("operation") String operation,@Param("stepId") String stepId);
Integer resrcePlanCheck(String handle);
Integer resrceTaskCheck(String handle);
Integer inspectTaskCheck(String handle);
}

@ -8,4 +8,14 @@ import java.util.Map;
@Repository
public interface ReportDataMapper {
List<Map<String, Object>> findInspectionTask(Map paramMap);
List<Map<String, Object>> findResourceLoadRateInfo(Map paramMap);
List<Map<String, Object>> findResourceRepairDataStatInfo(Map paramMap);
List<Map<String, Object>> findProductStateInfo(Map paramMap);
}

@ -11,4 +11,27 @@ public interface ReportDataService {
* @return
*/
List<Map<String, Object>> findInspectionTask(Map paramMap);
/**
*
*
* @param paramMap
* @return
*/
List<Map<String, Object>> findResourceLoadRateInfo(Map paramMap);
/**
*
*
* @param paramMap
* @return
*/
List<Map<String, Object>> findResourceRepairDataStatInfo(Map paramMap);
/**
*
*
* @param paramMap
* @return
*/
List<Map<String, Object>> findProductStateInfo(Map paramMap);
}

@ -219,7 +219,20 @@ public class InspectionItemServiceImpl extends ServiceImpl<InspectionItemMapper,
throw new BaseException("请输入版本");
}
inspectionItem.setSite(CommonMethods.getSite());
inspectionItem.setHandle(HandleEnum.INSPECTION_ITEM.getHandle(inspectionItem.getSite(), inspectionItem.getInspectionItemNo(), inspectionItem.getRevision()));
String handle = HandleEnum.INSPECTION_ITEM.getHandle(inspectionItem.getSite(), inspectionItem.getInspectionItemNo(), inspectionItem.getRevision());
inspectionItem.setHandle(handle);
Integer num=inspectionItemMapper.resrcePlanCheck(handle);
if (num>0){
throw new BaseException("检验项目已被使用,无法删除");
}
num=inspectionItemMapper.resrceTaskCheck(handle);
if (num>0){
throw new BaseException("检验项目已被使用,无法删除");
}
num=inspectionItemMapper.inspectTaskCheck(handle);
if (num>0){
throw new BaseException("检验项目已被使用,无法删除");
}
HashMap<String, Object> removeCondition = new HashMap<>();
removeCondition.put(InspectionItemAddition.INSPECTION_ITEM_BO, inspectionItem.getHandle());
inspectionItemAdditionService.removeByMap(removeCondition);

@ -159,7 +159,8 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
}
public void printServer(List<LabelPrintDto> list){
String post = HttpUtil.post(printServer, JSON.toJSONString(list), 60000);
// 超时时间180秒/3分钟
String post = HttpUtil.post(printServer, JSON.toJSONString(list), 180000);
/**
* {"msg":"打印成功","code":0}
* {"msg":"打印失败","code":500}

@ -20,4 +20,19 @@ public class ReportDataServiceImpl implements ReportDataService{
public List<Map<String, Object>> findInspectionTask(Map paramMap) {
return reportDataMapper.findInspectionTask(paramMap);
}
@Override
public List<Map<String, Object>> findResourceLoadRateInfo(Map paramMap) {
return reportDataMapper.findResourceLoadRateInfo(paramMap);
}
@Override
public List<Map<String, Object>> findResourceRepairDataStatInfo(Map paramMap) {
return reportDataMapper.findResourceRepairDataStatInfo(paramMap);
}
@Override
public List<Map<String, Object>> findProductStateInfo(Map paramMap) {
return reportDataMapper.findProductStateInfo(paramMap);
}
}

@ -2,6 +2,7 @@ package com.foreverwin.mesnac.common.util;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;
@ -15,6 +16,7 @@ public class ActiveMQUtil {
@Autowired
@Qualifier("mesJmsTemplate")
private JmsMessagingTemplate mesJmsTemplate;
public void wechatSendMessage(String user, String text) {

@ -475,4 +475,14 @@
WHERE (ziia.ADDITIONAL_OBJECT_TYPE='ITEM' OR ziia.ADDITIONAL_OBJECT_TYPE='OPERATION') AND zii.STATUS='Y' AND zii.INSPECTION_TYPE=#{inspectionType}
AND ziia.ADDITIONAL_OBJECT=#{additionalObject} AND zii.SITE=#{site}
</select>
<select id="resrcePlanCheck" resultType="java.lang.Integer">
SELECT count(HANDLE) FROM Z_RESOURCE_INSPECT_PLAN zrip WHERE INSPECTION_ITEM_BO=#{handle}
</select>
<select id="resrceTaskCheck" resultType="java.lang.Integer">
SELECT count(HANDLE) FROM Z_RESOURCE_INSPECT_TASK zrip WHERE INSPECTION_ITEM_BO=#{handle}
</select>
<select id="inspectTaskCheck" resultType="java.lang.Integer">
SELECT count(HANDLE) FROM Z_INSPECTION_TASK zrip WHERE INSPECTION_ITEM_BO=#{handle}
</select>
</mapper>

@ -570,7 +570,7 @@
<!--根据sfcBo查询当前条码的打印信息-->
<select id="findSfcPrintInfoBySfc" resultType="com.foreverwin.mesnac.common.dto.LabelPrintDto">
SELECT IM.ITEM , I.ITEM_BO PRINTER, S.SFC, IT.DESCRIPTION ITEM_DESCRIPTION, ZSD.SHOP_ORDER,
I.QTY_ON_HAND QTY ,ZSD.BLANKING_SIZE , CF.VALUE DRAWING_REVISION
I.QTY_ON_HAND QTY ,ZSD.BLANKING_SIZE , CF.VALUE DRAWING_REVISION ,CASE WHEN CFA.VALUE = '9' THEN 'true' ELSE 'false' END MAIN_PART
FROM INVENTORY I
LEFT JOIN SFC S ON I.INVENTORY_CONTEXT_GBO = S.HANDLE
LEFT JOIN
@ -579,6 +579,7 @@
LEFT JOIN ITEM IM ON IM.HANDLE = I.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = I.ITEM_BO AND CF."ATTRIBUTE" = 'DRAWING_REVISION'
LEFT JOIN CUSTOM_FIELDS CFA ON CFA.HANDLE = I.ITEM_BO AND CFA."ATTRIBUTE" = 'ACCESSORY_TYPE'
WHERE S.SFC = #{sfc} AND I.SITE = #{site}
</select>
<!--自定义sql-->

@ -49,4 +49,19 @@
</if>
</select>
<!--设备符合率报表-->
<select id="findResourceLoadRateInfo" resultType="java.util.HashMap" parameterType="java.util.HashMap" >
</select>
<!--设备维修数据统计报表-->
<select id="findResourceRepairDataStatInfo" resultType="java.util.HashMap" parameterType="java.util.HashMap" >
</select>
<!--每日生产状态报表-->
<select id="findProductStateInfo" resultType="java.util.HashMap" parameterType="java.util.HashMap" >
</select>
</mapper>

@ -326,7 +326,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
//更改派工单状态
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), dispatchNo, DispatchStatusEnum.COMPLETE.getCode(),workHour);
//报工
//sendErp(sfc, stepId, qty, BigDecimal.ZERO, workHour);
sendErp(sfc, stepId, qty, BigDecimal.ZERO, workHour);
} catch (Exception e) {
ExceptionUtil.throwException(e);
}

Loading…
Cancel
Save