فهرست منبع

增加钢坯装运单新增编辑用于单页面的接口

lingpeng.li 2 ماه پیش
والد
کامیت
576b2336d7

+ 4 - 0
zgztBus/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

@@ -154,6 +154,10 @@ public class ShiroConfig {
         //测试模块排除
         filterChainDefinitionMap.put("/test/seata/**", "anon");
 
+        //车位模块排除
+        filterChainDefinitionMap.put("/storageBill/listNoToken", "anon");
+        filterChainDefinitionMap.put("/storageBill/editNoToken", "anon");
+
         // update-begin--author:liusq Date:20230522 for:[issues/4829]访问不存在的url时会提示Token失效,请重新登录呢
         //错误路径排除
         filterChainDefinitionMap.put("/error", "anon");

+ 46 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/controller/StorageBillController.java

@@ -1174,4 +1174,50 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 		storageBillService.updateStatusByLicensePlate(licensePlateStatus,licensePlate);
 		return Result.OK("修改成功!");
 	}
+
+
+	/**
+	 * 分页列表查询
+	 *
+	 * @return
+	 */
+	@ApiOperation(value="钢坯装运单-分页列表查询(不带Token)", notes="钢坯装运单-分页列表查询")
+	@GetMapping(value = "/listNoToken")
+	public Result<StorageBill> queryPageListNoToken(@RequestParam(name="ccmNo") String ccmNo,
+													@RequestParam(name="positionNum") String positionNum) {
+
+		LambdaQueryWrapper<StorageBill> queryWrapper = new LambdaQueryWrapper<>();
+		queryWrapper.eq(StorageBill::getCcmNo, ccmNo)
+				.eq(StorageBill::getPositionNum,positionNum)
+				.orderByDesc(StorageBill::getCreateTime).last("LIMIT 1");
+
+		StorageBill latestStorageBill = storageBillService.getOne(queryWrapper);
+		return Result.OK(latestStorageBill);
+	}
+
+
+    /**
+     *  编辑
+     *
+     * @param storageBill
+     * @return
+     */
+    @ApiOperation(value="钢坯装运单-编辑(不带Token)", notes="钢坯装运单-编辑(不带Token)")
+    @RequestMapping(value = "/editNoToken", method = {RequestMethod.PUT})
+    public Result<String> editNoToken(@RequestBody StorageBill storageBill) {
+		if(oConvertUtils.isNotEmpty(storageBill.getId())) {
+			StorageBill bill = storageBillService.getById(storageBill.getId());
+			if(oConvertUtils.isNotEmpty(storageBill.getLicensePlateStatus())){
+				bill.setLicensePlateStatus(storageBill.getLicensePlateStatus());
+			}
+			if(oConvertUtils.isNotEmpty(storageBill.getDestination())){
+				bill.setDestination(storageBill.getDestination());
+			}
+			if(oConvertUtils.isNotEmpty(storageBill.getTypeConfigId())){
+				bill.setTypeConfigId(storageBill.getTypeConfigId());
+			}
+			storageBillService.updateById(bill);
+		}
+        return Result.OK("编辑成功!");
+    }
 }