Merge remote-tracking branch 'origin/master'

master
zpl 4 years ago
commit 4587d94bf6

@ -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>

@ -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);
}

@ -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);

@ -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>

@ -8,14 +8,23 @@ spring:
driver-class-name: com.sap.db.jdbc.Driver
jndi-name: jdbc/jts/wipPool
activemq:
enabled: false
brokerUrl: tcp://121.36.58.109:61616?wireFormat.maxInactivityDuration=0
enabled: true
brokerUrl: tcp://113.98.201.217:61616?wireFormat.maxInactivityDuration=0
password: admin
user: admin
pool:
enabled: true
max-connections: 10
#发送消息
activemq:
brokerUrl: tcp://113.98.201.217:61616?wireFormat.maxInactivityDuration=0
password: admin
user: admin
pool:
enabled: true
max-connections: 10
#WebService
ws:
erp:
@ -40,9 +49,7 @@ print:
quartz:
enabled: true
activeMq:
sendWeChatMessage: tcp://localhost:61616?wireFormat.maxInactivityDuration=0
queue: send.weChat.notice
exportDocument:
filePath: /usr/word/
outputPath: /usr/word/outputWord/

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

@ -8,6 +8,8 @@ import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
@ -20,11 +22,15 @@ 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");
@Autowired
private ResourceInspectTaskJobService resourceInspectTaskJobService;
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
logger.info("设备点检任务创建定时任务开始执行");
//获取站点,若站点为空则抛出异常
String site = getSite(context);
if (StringUtil.isBlank(site)) {

Loading…
Cancel
Save