|
@@ -1,5 +1,6 @@
|
|
|
package org.jeecg.modules.billet.billetHotsend.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
@@ -309,16 +310,16 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void saveBilletHotsendDetails(BilletHotsendDetailsVo billetHotsendDetailsVo) {
|
|
|
+ public JSONObject saveBilletHotsendDetails(BilletHotsendDetailsVo billetHotsendDetailsVo) {
|
|
|
+ JSONObject result = new JSONObject();
|
|
|
// 根据billetHotsendTypeConfigId 查询基础垛位信息
|
|
|
BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(billetHotsendDetailsVo.getBilletHotsendTypeConfigId());
|
|
|
List<RollClubCommon> rollClubCommonList = billetHotsendDetailsVo.getRollClubCommonList();
|
|
|
BilletHotsend billetHotsend = new BilletHotsend();
|
|
|
// 新保存 钢坯热送基础信息
|
|
|
BeanUtils.copyProperties(billetHotsendDetailsVo.getBilletHotsend(), billetHotsend);
|
|
|
- billetHotsend.setCreateDate(new Date());
|
|
|
// billetHotsend.setAmountTotal(rollClubCommonList.size()); //总支数
|
|
|
- LambdaQueryWrapper<HeatsActuals> queryWrapperHA = new LambdaQueryWrapper();
|
|
|
+ LambdaQueryWrapper<HeatsActuals> queryWrapperHA = new LambdaQueryWrapper<>();
|
|
|
queryWrapperHA.eq(HeatsActuals::getCasterCode, billetHotsend.getCcmNo()).eq(HeatsActuals::getHeatsCode, billetHotsend.getHeatNo());
|
|
|
HeatsActuals heatsActuals = heatsActualsService.getOne(queryWrapperHA);
|
|
|
LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
|
|
@@ -337,7 +338,8 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
}
|
|
|
BilletHotsend check = baseMapper.selectOne(queryWrapper);
|
|
|
if (oConvertUtils.isNotEmpty(check) && oConvertUtils.listIsEmpty(rollClubCommonList)){
|
|
|
- return;
|
|
|
+ result.put("fail", "该炉次信息已存在!");
|
|
|
+ return result;
|
|
|
}
|
|
|
if (oConvertUtils.isEmpty(check) && oConvertUtils.listIsEmpty(rollClubCommonList)){
|
|
|
billetHotsend.setRollclubtwoNum(0);
|
|
@@ -350,7 +352,8 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
baseMapper.insert(billetHotsend);
|
|
|
billetHotsend.setId(billetHotsend.getId());
|
|
|
operateLogService.add(billetHotsend,null,BilletHotsend.class);
|
|
|
- return;
|
|
|
+ result.put("success", "新增钢坯热送成功!");
|
|
|
+ return result;
|
|
|
}else {
|
|
|
if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
|
|
|
if (oConvertUtils.isEmpty(check) || oConvertUtils.isEmpty(check.getRollcluboneNum())){
|
|
@@ -613,6 +616,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
x.setUpdateTime(new Date());
|
|
|
});
|
|
|
billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
|
|
|
+
|
|
|
+ result.put("success", "新增钢坯热送成功!");
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|