Compare commits
11 Commits
9ccfb01df2
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 40d7073f9f | |||
| 7c9e61bb2b | |||
| f1f7319062 | |||
| 7c0d58e25b | |||
| 5ba6b29075 | |||
| 79b06a2ed3 | |||
| b64237d408 | |||
| 39a4962bdb | |||
| 0ddca88df9 | |||
| 0cb646a867 | |||
| b2db4e735d |
@@ -176,6 +176,7 @@ public class IndustryMaterialController extends BaseController
|
|||||||
IndustryStep industryStep = new IndustryStep();
|
IndustryStep industryStep = new IndustryStep();
|
||||||
industryStep.setStep(1L);
|
industryStep.setStep(1L);
|
||||||
industryStep.setDelFlag(0L);
|
industryStep.setDelFlag(0L);
|
||||||
|
industryStep.setBatchId(industryMaterial.getBatchId());
|
||||||
industryStepService.start(industryStep);
|
industryStepService.start(industryStep);
|
||||||
return success(industryMaterialService.start(industryMaterial));
|
return success(industryMaterialService.start(industryMaterial));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ industry:
|
|||||||
captchaType: math
|
captchaType: math
|
||||||
|
|
||||||
# 0为粗轧,1为精轧
|
# 0为粗轧,1为精轧
|
||||||
mode: 1
|
mode: 0
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 8082
|
port: 8081
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
@@ -73,7 +73,7 @@ spring:
|
|||||||
# 地址
|
# 地址
|
||||||
host: localhost
|
host: localhost
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6380
|
port: 6379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 0
|
database: 0
|
||||||
# 密码
|
# 密码
|
||||||
@@ -143,7 +143,7 @@ xss:
|
|||||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||||
|
|
||||||
|
|
||||||
ipAddress: 10.20.10.29
|
ipAddress: 10.20.10.30
|
||||||
|
|
||||||
httpIp: http://10.20.10.158
|
httpIp: http://10.20.10.158
|
||||||
|
|
||||||
|
|||||||
@@ -92,4 +92,7 @@ public interface IndustryMaterialMapper
|
|||||||
List<IndustryMaterialVo> selectIndustryMaterialListAndNotFinish();
|
List<IndustryMaterialVo> selectIndustryMaterialListAndNotFinish();
|
||||||
|
|
||||||
List<IndustryMaterialVo> selectIndustryListRecord(IndustryMaterial industryMaterial);
|
List<IndustryMaterialVo> selectIndustryListRecord(IndustryMaterial industryMaterial);
|
||||||
|
|
||||||
|
void updateIndustryMaterialByBatchId(IndustryMaterial params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public interface IIndustryMaterialService
|
|||||||
|
|
||||||
void deleteIndustryMaterialByState(Long state);
|
void deleteIndustryMaterialByState(Long state);
|
||||||
|
|
||||||
String insertIndustryMaterialToSlaveDataSource(List<IndustryMaterialVo> industryMaterialVos);
|
String insertIndustryMaterialToSlaveDataSource(List<IndustryMaterialVo> industryMaterialVos, Long aLong);
|
||||||
|
|
||||||
/**3
|
/**3
|
||||||
*
|
*
|
||||||
@@ -136,4 +136,7 @@ public interface IIndustryMaterialService
|
|||||||
int toCheckErrorMaterial(List<IndustryMaterialVo> successList);
|
int toCheckErrorMaterial(List<IndustryMaterialVo> successList);
|
||||||
|
|
||||||
int delIndustryMaterialById(String id);
|
int delIndustryMaterialById(String id);
|
||||||
|
|
||||||
|
void clearSystem();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,23 +119,31 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DataSource(value = DataSourceType.SLAVE)
|
@DataSource(value = DataSourceType.SLAVE)
|
||||||
public String insertIndustryMaterialToSlaveDataSource(List<IndustryMaterialVo> industryMaterialVos) {
|
public String insertIndustryMaterialToSlaveDataSource(List<IndustryMaterialVo> industryMaterialVos,Long insertBatchId) {
|
||||||
|
|
||||||
// 直接删掉扫入并且未轧制的,写入二辊数据到四辊机器里面
|
|
||||||
clearSystem();
|
// TODO 这里需要查一下数据库查看是否有正在轧或者说是未轧的情况 state=1,3,4
|
||||||
// TODO 这里需要查一下数据库查看是否有正在轧或者说是未轧的情况 state=0,1,3,4
|
|
||||||
List<IndustryMaterialVo> industryMaterialVos1 = industryMaterialMapper.selectIndustryMaterialListAndNotFinish();
|
List<IndustryMaterialVo> industryMaterialVos1 = industryMaterialMapper.selectIndustryMaterialListAndNotFinish();
|
||||||
|
|
||||||
System.out.println("触发四辊数据写入");
|
System.out.println("触发四辊数据写入");
|
||||||
// 这个大小等于0 表示四辊没有东西再轧制了可以进行放行
|
// 这个大小等于0 表示四辊没有东西再轧制了可以进行放行
|
||||||
if (industryMaterialVos1.isEmpty()) {
|
if (industryMaterialVos1.isEmpty()) {
|
||||||
IndustryBatch industryBatch = new IndustryBatch();
|
|
||||||
industryBatch.setBatchSize((long) industryMaterialVos.size());
|
if (Objects.nonNull(insertBatchId)) {
|
||||||
industryBatchService.insertIndustryBatch(industryBatch);
|
IndustryBatchVo industryBatchVo = industryBatchService.selectIndustryBatchById(insertBatchId);
|
||||||
|
industryBatchVo.setBatchSize(industryBatchVo.getBatchSize() + 1);
|
||||||
|
industryBatchService.updateIndustryBatch(industryBatchVo);
|
||||||
|
}else{
|
||||||
|
IndustryBatch industryBatch = new IndustryBatch();
|
||||||
|
industryBatch.setBatchSize((long) industryMaterialVos.size());
|
||||||
|
industryBatchService.insertIndustryBatch(industryBatch);
|
||||||
|
insertBatchId = industryBatch.getId();
|
||||||
|
redis2Cache.setCacheObject("insertBatchId", insertBatchId,3000,TimeUnit.HOURS);
|
||||||
|
}
|
||||||
for (IndustryMaterialVo industryMaterialVo : industryMaterialVos) {
|
for (IndustryMaterialVo industryMaterialVo : industryMaterialVos) {
|
||||||
industryMaterialVo.setState(0L);
|
industryMaterialVo.setState(0L);
|
||||||
industryMaterialVo.setStepSize(null);
|
industryMaterialVo.setStepSize(null);
|
||||||
industryMaterialVo.setBatchId(industryBatch.getId());
|
industryMaterialVo.setBatchId(insertBatchId);
|
||||||
industryMaterialVo.setDelFlag(0L);
|
industryMaterialVo.setDelFlag(0L);
|
||||||
industryMaterialVo.setFinalDiameter(null);
|
industryMaterialVo.setFinalDiameter(null);
|
||||||
industryMaterialVo.setOperation(0L);
|
industryMaterialVo.setOperation(0L);
|
||||||
@@ -309,7 +317,6 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
for (IndustryMaterialVo industryMaterialVo : industryMaterialVos) {
|
for (IndustryMaterialVo industryMaterialVo : industryMaterialVos) {
|
||||||
if (Objects.nonNull(industryMaterialVo.getId())) {
|
if (Objects.nonNull(industryMaterialVo.getId())) {
|
||||||
industryMaterialMapper.submitMaterial(industryMaterialVo);
|
industryMaterialMapper.submitMaterial(industryMaterialVo);
|
||||||
|
|
||||||
// 将异常的道次恢复成初始料
|
// 将异常的道次恢复成初始料
|
||||||
IndustryStep industryStep = new IndustryStep();
|
IndustryStep industryStep = new IndustryStep();
|
||||||
industryStep.setBatchId(industryMaterialVo.getBatchId());
|
industryStep.setBatchId(industryMaterialVo.getBatchId());
|
||||||
@@ -784,12 +791,6 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
// 首先查看是否有该批次的料
|
// 首先查看是否有该批次的料
|
||||||
if (Objects.nonNull(industryMaterialVos) && !industryMaterialVos.isEmpty()) {
|
if (Objects.nonNull(industryMaterialVos) && !industryMaterialVos.isEmpty()) {
|
||||||
// 检测他们的工艺是否相同
|
// 检测他们的工艺是否相同
|
||||||
// IndustryMaterialVo firstIndustryMaterial = industryMaterialVos.get(0);
|
|
||||||
// for (IndustryMaterialVo materialVo : industryMaterialVos) {
|
|
||||||
// if (!Objects.equals(firstIndustryMaterial.getTechnology(), materialVo.getTechnology())) {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
for (IndustryMaterialVo materialVo : industryMaterialVos) {
|
for (IndustryMaterialVo materialVo : industryMaterialVos) {
|
||||||
materialVo.setState(1L);
|
materialVo.setState(1L);
|
||||||
updateIndustryMaterial(materialVo);
|
updateIndustryMaterial(materialVo);
|
||||||
@@ -809,6 +810,10 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void getMaterialData() {
|
public void getMaterialData() {
|
||||||
|
//打印leftId和rightId
|
||||||
|
System.out.println("监测到id-leftId或者rightId");
|
||||||
|
System.out.println("leftId:" + redisCache.getCacheObject("leftId"));
|
||||||
|
System.out.println("rightId:" + redisCache.getCacheObject("rightId"));
|
||||||
IndustryMaterial material = new IndustryMaterial();
|
IndustryMaterial material = new IndustryMaterial();
|
||||||
material.setState(1L);
|
material.setState(1L);
|
||||||
if (!industryMaterialMapper.selectIndustryMaterialList2(material).isEmpty()) {
|
if (!industryMaterialMapper.selectIndustryMaterialList2(material).isEmpty()) {
|
||||||
@@ -843,8 +848,11 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
|
|
||||||
// 小于9则一直接受来料
|
// 小于9则一直接受来料
|
||||||
String industryMaterialId = s7PLC.readString("DB4.30", 64);
|
String industryMaterialId = s7PLC.readString("DB4.30", 64);
|
||||||
|
System.out.println("industryMaterialId----------:" + industryMaterialId);
|
||||||
|
|
||||||
industryMaterialId = industryMaterialId.replace("\u0000", "");
|
industryMaterialId = industryMaterialId.replace("\u0000", "");
|
||||||
|
System.out.println("industryMaterialId----------:" + industryMaterialId);
|
||||||
|
|
||||||
// 读取是否有此id
|
// 读取是否有此id
|
||||||
String leftId = redisCache.getCacheObject("leftId");
|
String leftId = redisCache.getCacheObject("leftId");
|
||||||
// 不为空表示读到了
|
// 不为空表示读到了
|
||||||
@@ -877,6 +885,10 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
|
|
||||||
String specification = s7PLC.readString("DB4.162", 128);
|
String specification = s7PLC.readString("DB4.162", 128);
|
||||||
specification = specification.replace("\u0000", "");
|
specification = specification.replace("\u0000", "");
|
||||||
|
System.out.println(" diameter:" + diameterLeft);
|
||||||
|
System.out.println(" width:" + widthLeft);
|
||||||
|
System.out.println(" technology:" + technology);
|
||||||
|
System.out.println(" specification:" + specification);
|
||||||
|
|
||||||
industryMaterial.setDiameter(diameterLeft);
|
industryMaterial.setDiameter(diameterLeft);
|
||||||
industryMaterial.setTechnology(technology);
|
industryMaterial.setTechnology(technology);
|
||||||
@@ -901,12 +913,14 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
redisCache.setCacheObject("size", size);
|
redisCache.setCacheObject("size", size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println("sort:---" + sort);
|
||||||
// 小于9则一直接受来料
|
// 小于9则一直接受来料
|
||||||
if (sort < 9L) {
|
if (sort < 9L) {
|
||||||
// industryMaterialId = (String) PLCUtils.getPLCData(connector,ipAddress, 44, 30, "string", 64, 10,MbFlag);
|
// industryMaterialId = (String) PLCUtils.getPLCData(connector,ipAddress, 44, 30, "string", 64, 10,MbFlag);
|
||||||
industryMaterialId = s7PLC.readString("DB44.30", 64);
|
industryMaterialId = s7PLC.readString("DB44.30", 64);
|
||||||
|
System.out.println("industryMaterialId----------:" + industryMaterialId);
|
||||||
industryMaterialId = industryMaterialId.replace("\u0000", "");
|
industryMaterialId = industryMaterialId.replace("\u0000", "");
|
||||||
|
System.out.println("industryMaterialId----------:" + industryMaterialId);
|
||||||
// 读取是否有此id
|
// 读取是否有此id
|
||||||
String rightId = (String) redisCache.getCacheObject("rightId");
|
String rightId = (String) redisCache.getCacheObject("rightId");
|
||||||
// 不为空表示读到了
|
// 不为空表示读到了
|
||||||
@@ -994,7 +1008,7 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
|
|
||||||
|
|
||||||
@DataSource(value = DataSourceType.SLAVE)
|
@DataSource(value = DataSourceType.SLAVE)
|
||||||
private void clearSystem() {
|
public void clearSystem() {
|
||||||
redis2Cache.deleteObject("sort");
|
redis2Cache.deleteObject("sort");
|
||||||
redis2Cache.deleteObject("batchId");
|
redis2Cache.deleteObject("batchId");
|
||||||
redis2Cache.deleteObject("leftId");
|
redis2Cache.deleteObject("leftId");
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.industry.common.plc.PLCSystemData;
|
|||||||
import com.industry.common.utils.DateUtils;
|
import com.industry.common.utils.DateUtils;
|
||||||
|
|
||||||
import com.industry.common.utils.Threads;
|
import com.industry.common.utils.Threads;
|
||||||
|
import com.industry.work.domain.IndustryBatch;
|
||||||
import com.industry.work.domain.IndustryMaterial;
|
import com.industry.work.domain.IndustryMaterial;
|
||||||
import com.industry.work.domain.IndustryStep;
|
import com.industry.work.domain.IndustryStep;
|
||||||
import com.industry.work.domain.IndustryTechnology;
|
import com.industry.work.domain.IndustryTechnology;
|
||||||
@@ -397,6 +398,8 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
// 如果当前模式是4辊
|
// 如果当前模式是4辊
|
||||||
if ("1".equals(mode)) {
|
if ("1".equals(mode)) {
|
||||||
redisCache.deleteObject("materialLock");
|
redisCache.deleteObject("materialLock");
|
||||||
|
redis2Cache.deleteObject("insertBatchId");
|
||||||
|
redis2Cache.deleteObject("originBatchId");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果当前模式是2辊
|
// 如果当前模式是2辊
|
||||||
@@ -406,14 +409,18 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
if (Objects.isNull(materialLock) || materialLock != 0L) {
|
if (Objects.isNull(materialLock) || materialLock != 0L) {
|
||||||
// 如果是空就写一个1进去占住锁
|
// 如果是空就写一个1进去占住锁
|
||||||
redis2Cache.setCacheObject("materialLock", 1L);
|
redis2Cache.setCacheObject("materialLock", 1L);
|
||||||
|
Long originBatchId = redis2Cache.getCacheObject("originBatchId");
|
||||||
|
if (Objects.isNull(originBatchId) || !originBatchId.equals(industryStep.getBatchId())) {
|
||||||
|
industryMaterialService.clearSystem();
|
||||||
|
}
|
||||||
// 然后把非异常的东西都赛里面
|
// 然后把非异常的东西都赛里面
|
||||||
industryMaterialVo = new IndustryMaterialVo();
|
industryMaterialVo = new IndustryMaterialVo();
|
||||||
industryMaterialVo.setBatchId(industryStep.getBatchId());
|
industryMaterialVo.setBatchId(industryStep.getBatchId());
|
||||||
industryMaterialVo.setState(6L);
|
industryMaterialVo.setState(6L);
|
||||||
List<IndustryMaterialVo> industryMaterialVos1 = industryMaterialMapper.selectIndustryMaterialList1(industryMaterialVo);
|
List<IndustryMaterialVo> industryMaterialVos1 = industryMaterialMapper.selectIndustryMaterialList1(industryMaterialVo);
|
||||||
String result = industryMaterialService.insertIndustryMaterialToSlaveDataSource(industryMaterialVos1);
|
Long insertBatchId = redis2Cache.getCacheObject("insertBatchId");
|
||||||
|
|
||||||
System.out.println(result);
|
String result = industryMaterialService.insertIndustryMaterialToSlaveDataSource(industryMaterialVos1,Objects.nonNull(insertBatchId)?insertBatchId:null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,10 +451,18 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
|
|
||||||
// 将状态改为了轧制中
|
// 将状态改为了轧制中
|
||||||
List<IndustryMaterialVo> successList = industryMaterialService.resourceToWorkAndCreateStep(industryMaterial);
|
List<IndustryMaterialVo> successList = industryMaterialService.resourceToWorkAndCreateStep(industryMaterial);
|
||||||
|
|
||||||
|
|
||||||
if (Objects.nonNull(successList) && !successList.isEmpty()) {
|
if (Objects.nonNull(successList) && !successList.isEmpty()) {
|
||||||
|
|
||||||
for (IndustryMaterialVo success : successList) {
|
// 强行对齐batch数据,避免batch出现比实际多的情况导致开始轧制失败
|
||||||
|
IndustryBatch industryBatch = new IndustryBatch();
|
||||||
|
industryBatch.setId(industryMaterial.getBatchId());
|
||||||
|
industryBatch.setBatchSize((long) successList.size());
|
||||||
|
industryBatchService.updateIndustryBatch(industryBatch);
|
||||||
|
|
||||||
|
|
||||||
|
for (IndustryMaterialVo success : successList) {
|
||||||
// 进入这里说明工艺没问题接下里根据工艺表创建道次
|
// 进入这里说明工艺没问题接下里根据工艺表创建道次
|
||||||
// 判断当前是粗轧还是精轧
|
// 判断当前是粗轧还是精轧
|
||||||
IndustryTechnology industryTechnology = new IndustryTechnology();
|
IndustryTechnology industryTechnology = new IndustryTechnology();
|
||||||
@@ -467,8 +482,10 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
// 校验是否都存在道次 如果有一个不存在此工艺直接返回不做任何操作
|
// 校验是否都存在道次 如果有一个不存在此工艺直接返回不做任何操作
|
||||||
if (industryTechnologyVos.isEmpty()) {
|
if (industryTechnologyVos.isEmpty()) {
|
||||||
// 把状态改回去
|
// 把状态改回去
|
||||||
success.setState(0L);
|
IndustryMaterial params = new IndustryMaterial();
|
||||||
industryMaterialMapper.updateIndustryMaterial(success);
|
params.setState(0L);
|
||||||
|
params.setBatchId(success.getBatchId());
|
||||||
|
industryMaterialMapper.updateIndustryMaterialByBatchId(params);
|
||||||
return Constants.NOT_HAVE_TECHNOLOGY;
|
return Constants.NOT_HAVE_TECHNOLOGY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,11 +508,12 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
List<IndustryTechnologyVo> industryTechnologyVos = industryTechnologyService.selectIndustryTechnologyList(industryTechnology);
|
List<IndustryTechnologyVo> industryTechnologyVos = industryTechnologyService.selectIndustryTechnologyList(industryTechnology);
|
||||||
// 添加特判 当工艺表为空时通知前端无此工艺不可进入轧制页面
|
// 添加特判 当工艺表为空时通知前端无此工艺不可进入轧制页面
|
||||||
|
|
||||||
|
System.out.println("生成道次");
|
||||||
// 也就是说这里不管下面的物料是否为此工艺也按照此工艺生成道次只不过不需要操作
|
// 也就是说这里不管下面的物料是否为此工艺也按照此工艺生成道次只不过不需要操作
|
||||||
for (IndustryTechnologyVo industryTechnologyVo : industryTechnologyVos) {
|
for (IndustryTechnologyVo industryTechnologyVo : industryTechnologyVos) {
|
||||||
|
System.out.println(industryTechnologyVo);
|
||||||
IndustryStep industryStep = getIndustryStep(industryMaterial, success, industryTechnologyVo);
|
IndustryStep industryStep = getIndustryStep(industryMaterial, success, industryTechnologyVo);
|
||||||
insertIndustryStep(industryStep);
|
industryStepMapper.insertIndustryStep(industryStep);
|
||||||
}
|
}
|
||||||
success.setStepSize((long) industryTechnologyVos.size());
|
success.setStepSize((long) industryTechnologyVos.size());
|
||||||
industryMaterialService.updateIndustryMaterial(success);
|
industryMaterialService.updateIndustryMaterial(success);
|
||||||
@@ -540,6 +558,8 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
// 如果当前模式是4辊
|
// 如果当前模式是4辊
|
||||||
if ("1".equals(mode)) {
|
if ("1".equals(mode)) {
|
||||||
redisCache.deleteObject("materialLock");
|
redisCache.deleteObject("materialLock");
|
||||||
|
redis2Cache.deleteObject("insertBatchId");
|
||||||
|
redis2Cache.deleteObject("originBatchId");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果当前模式是2辊
|
// 如果当前模式是2辊
|
||||||
@@ -568,15 +588,19 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
}
|
}
|
||||||
if (Objects.isNull(materialLock) || materialLock != 0L) {
|
if (Objects.isNull(materialLock) || materialLock != 0L) {
|
||||||
|
|
||||||
|
|
||||||
// 如果是空就写一个1进去占住锁
|
// 如果是空就写一个1进去占住锁
|
||||||
redis2Cache.setCacheObject("materialLock", 1L, 3000, TimeUnit.HOURS);
|
redis2Cache.setCacheObject("materialLock", 1L, 3000, TimeUnit.HOURS);
|
||||||
|
redis2Cache.setCacheObject("originBatchId", industryStep.getBatchId(), 3000, TimeUnit.HOURS);
|
||||||
// 然后把非异常的东西都赛里面
|
// 然后把非异常的东西都赛里面
|
||||||
|
// 直接删掉扫入并且未轧制的,写入二辊数据到四辊机器里面
|
||||||
|
industryMaterialService.clearSystem();
|
||||||
IndustryMaterialVo industryMaterialVo = new IndustryMaterialVo();
|
IndustryMaterialVo industryMaterialVo = new IndustryMaterialVo();
|
||||||
industryMaterialVo.setBatchId(industryStep.getBatchId());
|
industryMaterialVo.setBatchId(industryStep.getBatchId());
|
||||||
industryMaterialVo.setState(2L);
|
industryMaterialVo.setState(2L);
|
||||||
List<IndustryMaterialVo> industryMaterialVos = industryMaterialMapper.selectIndustryMaterialList1(industryMaterialVo);
|
List<IndustryMaterialVo> industryMaterialVos = industryMaterialMapper.selectIndustryMaterialList1(industryMaterialVo);
|
||||||
String result = industryMaterialService.insertIndustryMaterialToSlaveDataSource(industryMaterialVos);
|
String result = industryMaterialService.insertIndustryMaterialToSlaveDataSource(industryMaterialVos, null);
|
||||||
System.out.println(result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -648,6 +672,7 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(IndustryStep industryStep) {
|
public void start(IndustryStep industryStep) {
|
||||||
|
industryStep.setState(0L);
|
||||||
List<IndustryStepVo> industryStepVos = industryStepMapper.selectIndustryStepList(industryStep);
|
List<IndustryStepVo> industryStepVos = industryStepMapper.selectIndustryStepList(industryStep);
|
||||||
if (!industryStepVos.isEmpty()) {
|
if (!industryStepVos.isEmpty()) {
|
||||||
IndustryStepVo firstStep = industryStepVos.get(0);
|
IndustryStepVo firstStep = industryStepVos.get(0);
|
||||||
|
|||||||
@@ -271,7 +271,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="selectIndustryMaterialListAndNotFinish"
|
<select id="selectIndustryMaterialListAndNotFinish"
|
||||||
resultMap="IndustryMaterialResult">
|
resultMap="IndustryMaterialResult">
|
||||||
select * from industry_material where state!=0 and state!=1 and state!=3 and state!=4 and state!=5
|
select * from industry_material where state=1 or state=3 or state=4 or state=5
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -373,6 +373,30 @@
|
|||||||
set state=#{state}
|
set state=#{state}
|
||||||
where id = #{materialId}
|
where id = #{materialId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateIndustryMaterialByBatchId">
|
||||||
|
update industry_material
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="specification != null">specification = #{specification},</if>
|
||||||
|
<if test="technology != null">technology = #{technology},</if>
|
||||||
|
<if test="operation != null">operation = #{operation},</if>
|
||||||
|
<if test="diameter != null">diameter = #{diameter},</if>
|
||||||
|
<if test="sort != null">sort = #{sort},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="state != null">state = #{state},</if>
|
||||||
|
<if test="stepSize != null">step_size = #{stepSize},</if>
|
||||||
|
<if test="finalWidth != null">final_width = #{finalWidth},</if>
|
||||||
|
<if test="finalWidth2 != null">final_width2 = #{finalWidth2},</if>
|
||||||
|
<if test="finalDiameter != null">final_diameter = #{finalDiameter},</if>
|
||||||
|
<if test="finalDiameter2 != null">final_diameter2 = #{finalDiameter2},</if>
|
||||||
|
<if test="weight != null">weight = #{weight},</if>
|
||||||
|
<if test="width != null">width = #{width},</if>
|
||||||
|
</trim>
|
||||||
|
where batch_id = #{batchId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteIndustryMaterialByIds" parameterType="String">
|
<delete id="deleteIndustryMaterialByIds" parameterType="String">
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="selectIndustryTechnologyList" parameterType="IndustryTechnology" resultMap="IndustryTechnologyResult">
|
<select id="selectIndustryTechnologyList" parameterType="IndustryTechnology" resultMap="IndustryTechnologyResult">
|
||||||
<include refid="selectIndustryTechnologyVo"/>
|
<include refid="selectIndustryTechnologyVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="technologyId != null and technologyId != ''"> and technology_id = #{technologyId}</if>
|
<if test="technologyId != null"> and technology_id = #{technologyId}</if>
|
||||||
<if test="step != null "> and step = #{step}</if>
|
<if test="step != null "> and step = #{step}</if>
|
||||||
<if test="reduction != null "> and reduction = #{reduction}</if>
|
<if test="reduction != null "> and reduction = #{reduction}</if>
|
||||||
<if test="thicknessFront != null "> and thickness_front = #{thicknessFront}</if>
|
<if test="thicknessFront != null "> and thickness_front = #{thicknessFront}</if>
|
||||||
|
|||||||
179110
industry.sql
Normal file
179110
industry.sql
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user