|
@@ -52,6 +52,7 @@ import org.jeecg.modules.billet.storageCarLog.entity.StorageCarLog;
|
|
|
import org.jeecg.modules.billet.storageCarLog.service.IStorageCarLogService;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -110,6 +111,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
private IHeatsActualsService heatsActualsService;
|
|
|
@Autowired
|
|
|
private IBilletHotsendChangeShiftService billetHotsendChangeShiftService;
|
|
|
+ @Autowired
|
|
|
+ public RedisTemplate redisTemplate;
|
|
|
+
|
|
|
@Override
|
|
|
public void updateDesc(BilletHotsend billetHotsend) {
|
|
|
RulerDefaultConfig last = rulerDefaultConfigService.getLast(billetHotsend.getCcmNo());
|
|
@@ -1096,6 +1100,51 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
storageCarLogService.save(storageCarLog);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public JSONObject addBilletHotsendInfo(BilletHotsendDetailsVo billetHotsendDetailsVo) {
|
|
|
+ JSONObject result = new JSONObject();
|
|
|
+
|
|
|
+ BilletHotsend billetHotsend = billetHotsendDetailsVo.getBilletHotsend();
|
|
|
+ // 新保存 钢坯热送基础信息
|
|
|
+ String cacheShint = billetHotsend.getShift();
|
|
|
+ String cacheShintGroup = billetHotsend.getShiftGroup();
|
|
|
+ HeatsActuals heatsActuals = heatsActualsService.getOne(new LambdaQueryWrapper<HeatsActuals>()
|
|
|
+ .eq(HeatsActuals::getCasterCode, billetHotsend.getCcmNo())
|
|
|
+ .eq(HeatsActuals::getHeatsCode, billetHotsend.getHeatNo()));
|
|
|
+ if (heatsActuals != null){
|
|
|
+ cacheShint = heatsActuals.getShift();
|
|
|
+ cacheShintGroup = heatsActuals.getShiftGroup();
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
|
|
|
+ .eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
|
|
|
+ .eq(BilletHotsend::getShift, cacheShint)
|
|
|
+ .eq(BilletHotsend::getShiftGroup, cacheShintGroup);
|
|
|
+ BilletHotsend check = baseMapper.selectOne(queryWrapper);
|
|
|
+ if (oConvertUtils.isNotEmpty(check)){
|
|
|
+ result.put("fail", "该炉次信息已存在!");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ billetHotsend.setShiftGroup(cacheShintGroup);
|
|
|
+ billetHotsend.setShift(cacheShint);
|
|
|
+ if (oConvertUtils.isEmpty(check)){
|
|
|
+ billetHotsend.setRollclubtwoNum(0);
|
|
|
+ billetHotsend.setRollcluboneNum(0);
|
|
|
+ billetHotsend.setRolloutshippNum(0);
|
|
|
+ billetHotsend.setRollheightNum(0);
|
|
|
+ billetHotsend.setRollclubthreeNum(0);
|
|
|
+ billetHotsend.setAmountTotal(0);
|
|
|
+ billetHotsend.setStackNum(0);
|
|
|
+ baseMapper.insert(billetHotsend);
|
|
|
+ billetHotsend.setId(billetHotsend.getId());
|
|
|
+ operateLogService.add(billetHotsend,null,BilletHotsend.class);
|
|
|
+ result.put("success", "新增钢坯热送单成功!");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public Integer queryEndNumByCcmNo(String ccmNo, String heatNo, String belongTable) {
|