Explorar o código

钢坯update001

qiangxuan hai 8 meses
pai
achega
51aca237fc

+ 21 - 5
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendChangeShift/controller/BilletHotsendChangeShiftController.java

@@ -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("交班成功!");
 	}
 	
 	/**

+ 4 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendConfig/entity/BilletHotsendTypeConfig.java

@@ -64,6 +64,10 @@ public class BilletHotsendTypeConfig implements Serializable {
     @Excel(name = "归属类型(0:棒线,1:堆垛类型)", width = 15)
     @ApiModelProperty(value = "归属类型")
     private Integer belongType;
+
+    @Excel(name = "是否车运(0:否,1:是)", width = 15)
+    @ApiModelProperty(value = "是否车运")
+    private Integer isTrucking;
 	/**备注*/
 	@Excel(name = "备注", width = 15)
     @ApiModelProperty(value = "备注")

+ 6 - 3
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendDetails/controller/BilletHotsendDetailsController.java

@@ -165,10 +165,13 @@ public class BilletHotsendDetailsController extends JeecgController<BilletHotsen
 	  * @param id
 	  * @return
 	  */
-	 @ApiOperation(value="钢坯热送单炉支数结束根数-通过id查询", notes="钢坯热送单炉支数结束根数-通过id查询")
+	 @ApiOperation(value="钢坯热送单炉支数结束根数-通过铸机号和炉号查询", notes="钢坯热送单炉支数结束根数-通过铸机号和炉号查询")
 	 @GetMapping(value = "/queryEndNumByCcmNo")
-	 public Result<BilletHotsendDetails> queryEndNumById(@RequestParam(name="ccmNo",required=false) Integer ccmNo, @RequestParam(name="heatNo",required=false) String heatNo, @RequestParam(name="billetNo",required=false) String billetNo) {
-		 BilletHotsendDetails billetHotsendDetails = billetHotsendDetailsService.queryEndNumByCcmNo(ccmNo, heatNo, billetNo);
+	 public Result<BilletHotsendDetails> queryEndNumById(@RequestParam(name="ccmNo",required=false) Integer ccmNo,
+														 @RequestParam(name="heatNo",required=false) String heatNo,
+														 @RequestParam(name="billetNo",required=false) String billetNo,
+														 @RequestParam(name="bhtcId",required=false) String bhtcId) {
+		 BilletHotsendDetails billetHotsendDetails = billetHotsendDetailsService.queryEndNumByCcmNo(ccmNo, heatNo, billetNo, bhtcId);
 		 if(billetHotsendDetails==null) {
 			 return Result.error("未找到对应数据");
 		 }

+ 1 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendDetails/service/IBilletHotsendDetailsService.java

@@ -11,5 +11,5 @@ import org.jeecg.modules.billet.billetHotsendDetails.entity.BilletHotsendDetails
  */
 public interface IBilletHotsendDetailsService extends IService<BilletHotsendDetails> {
 
-    BilletHotsendDetails queryEndNumByCcmNo(Integer ccmNo, String heatNo, String billetNo);
+    BilletHotsendDetails queryEndNumByCcmNo(Integer ccmNo, String heatNo, String billetNo, String bhtcId);
 }

+ 2 - 2
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendDetails/service/impl/BilletHotsendDetailsServiceImpl.java

@@ -21,13 +21,13 @@ import java.util.List;
 public class BilletHotsendDetailsServiceImpl extends ServiceImpl<BilletHotsendDetailsMapper, BilletHotsendDetails> implements IBilletHotsendDetailsService {
 
     @Override
-    public BilletHotsendDetails queryEndNumByCcmNo(Integer ccmNo, String heatNo, String billetNo) {
+    public BilletHotsendDetails queryEndNumByCcmNo(Integer ccmNo, String heatNo, String billetNo, String bhtcId) {
         LambdaQueryWrapper<BilletHotsendDetails> queryWrapper = new LambdaQueryWrapper<>();
         if (oConvertUtils.isNotEmpty(ccmNo) && oConvertUtils.isNotEmpty(heatNo)){
             if (oConvertUtils.isNotEmpty(billetNo)){
                 queryWrapper.eq(BilletHotsendDetails::getCcmNo, ccmNo).eq(BilletHotsendDetails::getHeatNo, heatNo).eq(BilletHotsendDetails::getBilletNo, billetNo);
             }else {
-                queryWrapper.eq(BilletHotsendDetails::getCcmNo, ccmNo).eq(BilletHotsendDetails::getHeatNo, heatNo);
+                queryWrapper.eq(BilletHotsendDetails::getCcmNo, ccmNo).eq(BilletHotsendDetails::getHeatNo, heatNo).eq(BilletHotsendDetails::getBhtcId, bhtcId);
             }
         }
         List<BilletHotsendDetails> billetHotsendDetailsList = baseMapper.selectList(queryWrapper);