ソースを参照

调整棒三 确认逻辑

guoqiang 1 ヶ月 前
コミット
039d96e631

+ 40 - 3
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/controller/StorageBillPrintController.java

@@ -36,6 +36,8 @@ import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippDetailsService
 import org.jeecg.modules.billet.storageBill.entity.StorageBill;
 import org.jeecg.modules.billet.storageBill.entity.StorageBillPrint;
 import org.jeecg.modules.billet.storageBill.service.IStorageBillPrintService;
+import org.jeecg.modules.billet.storageBill.service.IStorageBillService;
+import org.jeecg.modules.billet.storageBill.vo.StorageBillPrintVO;
 import org.jeecg.modules.billet.storageBill.vo.StorageCenterExportRow;
 import org.jeecg.modules.carUnit.entity.SysDict;
 import org.jeecg.modules.carUnit.entity.SysDictItem;
@@ -86,6 +88,9 @@ public class StorageBillPrintController extends JeecgController<StorageBillPrint
     @Autowired
     private IRollDeputyCrossDetailsService rollDeputyCrossDetailsService;
 
+    @Autowired
+    private IStorageBillService storageBillService;
+
     @Autowired
     BilletRulerConfigMapper billetRulerConfigMapper;
     /**
@@ -102,10 +107,28 @@ public class StorageBillPrintController extends JeecgController<StorageBillPrint
     @GetMapping(value = "/list")
     public Result<IPage<StorageBillPrint>> queryPageList(StorageBillPrint storageBillPrint,
                                                          @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                         @RequestParam(name = "pageSize", defaultValue = "50") Integer pageSize,
                                                          HttpServletRequest req) {
-        QueryWrapper<StorageBillPrint> queryWrapper = QueryGenerator.initQueryWrapper(storageBillPrint, req.getParameterMap());
+//        QueryWrapper<StorageBillPrint> queryWrapper = QueryGenerator.initQueryWrapper(storageBillPrint, req.getParameterMap());
+        QueryWrapper<StorageBillPrint> queryWrapper = new QueryWrapper<StorageBillPrint>();
         Page<StorageBillPrint> page = new Page<StorageBillPrint>(pageNo, pageSize);
+        // 铸机号查询条件
+        queryWrapper.eq("ccm_no", storageBillPrint.getCcmNo());
+        // 时间查询
+        if(oConvertUtils.isNotEmpty(storageBillPrint.getArrivalTime())){
+            // 开始时间
+            Date startTime = storageBillPrint.getArrivalTime();
+            // 结束时间+1天
+            Date endTime = DateUtils.addDays(startTime, 1);
+            log.info("查询时间范围:startTime={}, endTime={}", startTime, endTime);
+            // 修改时间范围查询条件为 >= startTime 且 <= endTime
+            queryWrapper.ge("arrival_time", startTime)  // 大于等于开始时间
+                    .le("arrival_time", endTime);   // 小于等于结束时间
+        }
+        // 班次信息like 查询条件
+        if (storageBillPrint.getClasses() != null && !storageBillPrint.getClasses().isEmpty() && storageBillPrint.getClasses() != null && !storageBillPrint.getClasses().isEmpty()) {
+            queryWrapper.like("classes", storageBillPrint.getClasses());
+        }
         IPage<StorageBillPrint> pageList = storageBillPrintService.page(page, queryWrapper);
         return Result.OK(pageList);
     }
@@ -133,9 +156,23 @@ public class StorageBillPrintController extends JeecgController<StorageBillPrint
      */
     @AutoLog(value = "装运单打印表-编辑")
     @ApiOperation(value = "装运单打印表-编辑", notes = "装运单打印表-编辑")
-    @RequiresPermissions("storageBillPrint:storage_bill_print:edit")
+//    @RequiresPermissions("storageBillPrint:storage_bill_print:edit")
     @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
     public Result<String> edit(@RequestBody StorageBillPrint storageBillPrint) {
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        if(oConvertUtils.isNotEmpty(storageBillPrint.getConfirmTime())){
+            storageBillPrint.setConfirmBy(sysUser.getRealname());
+            // 修改确认时间
+            storageBillPrint.setConfirmTime(new Date());
+            // 同步修改装运单storageBill 确认时间
+            StorageBill storageBillInfo = storageBillService.getById(storageBillPrint.getStorageBillId());
+            if(oConvertUtils.isNotEmpty(storageBillInfo)){
+                storageBillInfo.setConfirmTime(storageBillPrint.getConfirmTime());
+                storageBillInfo.setConfirmBy(sysUser.getRealname());
+                storageBillInfo.setRemark(storageBillPrint.getRemark());
+                storageBillService.updateById(storageBillInfo);
+            }
+        }
         storageBillPrintService.updateById(storageBillPrint);
         return Result.OK("编辑成功!");
     }

+ 8 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/dto/StorageBillPrintAddDTO.java

@@ -94,4 +94,12 @@ public class StorageBillPrintAddDTO {
     @ApiModelProperty(value = "冷坯/热坯")
     private String btype;
 
+    /**
+     * 铸机号
+     */
+    @Excel(name = "铸机号", width = 15)
+    @ApiModelProperty(value = "铸机号")
+    private String ccmNo;
+
+
 }

+ 20 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/entity/StorageBill.java

@@ -11,6 +11,7 @@ import org.jeecg.common.aspect.annotation.Dict;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.jeecgframework.poi.excel.annotation.ExcelIgnore;
 import org.springframework.format.annotation.DateTimeFormat;
+import org.w3c.dom.Text;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -38,6 +39,11 @@ public class StorageBill implements Serializable {
     /**创建人*/
     @ApiModelProperty(value = "创建人")
     private String createBy;
+    /**
+     * 确认人
+     */
+    @ApiModelProperty(value = "确认人")
+    private String confirmBy;
     /**创建日期*/
     @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@@ -51,6 +57,13 @@ public class StorageBill implements Serializable {
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "更新日期")
     private Date updateTime;
+    /**
+     *  确认日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "确认日期")
+    private Date confirmTime;
     /**所属部门*/
     @ApiModelProperty(value = "所属部门")
     private String sysOrgCode;
@@ -204,6 +217,13 @@ public class StorageBill implements Serializable {
     @ApiModelProperty(value = "看板总支数")
     private Integer panelAmountTotal;
 
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
     @ExcelIgnore
     @TableField(exist = false)
     private Map<String, Integer> heatNoCountMap;

+ 21 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/entity/StorageBillPrint.java

@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
 import org.jeecg.common.aspect.annotation.Dict;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.springframework.format.annotation.DateTimeFormat;
+import org.w3c.dom.Text;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -40,6 +41,11 @@ public class StorageBillPrint implements Serializable {
      */
     @ApiModelProperty(value = "创建人")
     private String createBy;
+    /**
+     * 确认人
+     */
+    @ApiModelProperty(value = "确认人")
+    private String confirmBy;
     /**
      * 创建日期
      */
@@ -59,6 +65,14 @@ public class StorageBillPrint implements Serializable {
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "更新日期")
     private Date updateTime;
+    /**
+     *  确认日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "确认日期")
+    private Date confirmTime;
+
     /**
      * 所属部门
      */
@@ -149,4 +163,11 @@ public class StorageBillPrint implements Serializable {
     @TableField(updateStrategy = FieldStrategy.IGNORED)
     @Dict(dicCode = "lg_btype")
     private String btype;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
 }