|
@@ -13,6 +13,7 @@ import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.entity.BilletHotsendChangeShift;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.service.IBilletHotsendChangeShiftService;
|
|
|
+import org.jeecg.modules.billet.operateLog.service.IOperateLogService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
@@ -20,8 +21,9 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.Date;
|
|
|
|
|
|
- /**
|
|
|
+/**
|
|
|
* @Description: 钢坯交班记录
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2024-11-19
|
|
@@ -34,6 +36,9 @@ import java.util.Arrays;
|
|
|
public class BilletHotsendChangeShiftController extends JeecgController<BilletHotsendChangeShift, IBilletHotsendChangeShiftService> {
|
|
|
@Autowired
|
|
|
private IBilletHotsendChangeShiftService billetHotsendChangeShiftService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IOperateLogService operateLogService;
|
|
|
|
|
|
/**
|
|
|
* 分页列表查询
|
|
@@ -60,16 +65,27 @@ public class BilletHotsendChangeShiftController extends JeecgController<BilletHo
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
|
- * @param billetHotsendChangeShift
|
|
|
+ * @param billetHotsendChangeShiftVo
|
|
|
* @return
|
|
|
*/
|
|
|
@AutoLog(value = "钢坯交班记录-添加")
|
|
|
@ApiOperation(value="钢坯交班记录-添加", notes="钢坯交班记录-添加")
|
|
|
@RequiresPermissions("billetHotsendChangeShift:billet_hotsend_change_shift:add")
|
|
|
@PostMapping(value = "/add")
|
|
|
- public Result<String> add(@RequestBody BilletHotsendChangeShift billetHotsendChangeShift) {
|
|
|
- billetHotsendChangeShiftService.save(billetHotsendChangeShift);
|
|
|
- return Result.OK("添加成功!");
|
|
|
+ public Result<String> add(@RequestBody BilletHotsendChangeShift billetHotsendChangeShiftVo) {
|
|
|
+ operateLogService.add(billetHotsendChangeShiftVo,null, BilletHotsendChangeShift.class);
|
|
|
+ QueryWrapper<BilletHotsendChangeShift> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("cast_machine", billetHotsendChangeShiftVo.getCastMachine())
|
|
|
+ .eq("pour_heats", billetHotsendChangeShiftVo.getPourHeats())
|
|
|
+ .eq("shift_group", billetHotsendChangeShiftVo.getShiftGroup())
|
|
|
+ .eq("shift", billetHotsendChangeShiftVo.getShift());
|
|
|
+ BilletHotsendChangeShift billetHotsendChangeShift = billetHotsendChangeShiftService.getOne(queryWrapper);
|
|
|
+ if (billetHotsendChangeShift != null){
|
|
|
+ return Result.error("交班记录已存在,请检查班组或班别!");
|
|
|
+ }
|
|
|
+ billetHotsendChangeShiftVo.setCreateTime(new Date());
|
|
|
+ billetHotsendChangeShiftService.save(billetHotsendChangeShiftVo);
|
|
|
+ return Result.OK("交班成功!");
|
|
|
}
|
|
|
|
|
|
/**
|