修改打包管理的的供应商
This commit is contained in:
parent
e72d1e3b66
commit
6e27d549dd
|
|
@ -6,6 +6,7 @@ import cn.hutool.core.util.IdUtil;
|
|||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.nflg.wms.admin.service.BasdeSerialNumberControllerService;
|
||||
import com.nflg.wms.common.constant.BarCodeProcessStage;
|
||||
import com.nflg.wms.common.constant.UserType;
|
||||
import com.nflg.wms.common.pojo.ApiResult;
|
||||
import com.nflg.wms.common.pojo.PageData;
|
||||
import com.nflg.wms.common.pojo.dto.PackageChildDTO;
|
||||
|
|
@ -39,6 +40,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 打包管理
|
||||
*/
|
||||
|
|
@ -96,7 +98,7 @@ public class PackingController extends BaseController {
|
|||
.eq(WmsPackage::getId, request.getId())
|
||||
.one();
|
||||
VUtil.trueThrowBusinessError(ObjectUtil.isNull(wmsPackage)).throwMessage("打包码不存在");
|
||||
// VUtil.trueThrowBusinessError(wmsPackage.getSupplierId() != UserUtil.getUserId()).throwMessage("非登录供应商,不可编辑");
|
||||
// VUtil.trueThrowBusinessError(wmsPackage.getSupplierId() != UserUtil.getUserId()).throwMessage("非登录供应商,不可编辑");
|
||||
VUtil.trueThrowBusinessError(wmsPackage.getPackageStatus() == 2).throwMessage("已收货,不可以编辑");
|
||||
packageService.lambdaUpdate().eq(WmsPackage::getId, request.getId())
|
||||
.set(WmsPackage::getPackageName, request.getPackingName())
|
||||
|
|
@ -139,6 +141,10 @@ public class PackingController extends BaseController {
|
|||
@PostMapping("search")
|
||||
@ApiMark(moduleName = "获取包装码信息", apiName = "获取包装码信息")
|
||||
public ApiResult<PageData<PackingVO>> search(@Valid @RequestBody PackingSearchQO request) {
|
||||
// 判断是否是供应商
|
||||
if (UserUtil.getType() == UserType.Supplier) {
|
||||
request.setSupplierId(UserUtil.getUserId());
|
||||
}
|
||||
return ApiResult.success(packageService.serach(request));
|
||||
}
|
||||
|
||||
|
|
@ -179,7 +185,7 @@ public class PackingController extends BaseController {
|
|||
// 首先判断当前包是否已经收货了
|
||||
WmsPackage wmsPackage = packageService.lambdaQuery()
|
||||
.eq(WmsPackage::getPackageCode, request.getPackageCode())
|
||||
// .eq(WmsPackage::getSupplierId, UserUtil.getUserId())
|
||||
// .eq(WmsPackage::getSupplierId, UserUtil.getUserId())
|
||||
.one();
|
||||
VUtil.trueThrowBusinessError(ObjectUtil.isNull(wmsPackage)).throwMessage("打包码不存在");
|
||||
VUtil.trueThrowBusinessError(wmsPackage.getPackageStatus() == 2).throwMessage("此打包码已收货");
|
||||
|
|
@ -379,7 +385,7 @@ public class PackingController extends BaseController {
|
|||
item.setDeliveryNo(qo.getDeliveryNo());
|
||||
item.setDeliveryLineNo(qo.getDeliveryLineNo());
|
||||
item.setSrmOrderItemId(qo.getSrmOrderItemId());
|
||||
item.setPackageStatus((short)0);
|
||||
item.setPackageStatus((short) 0);
|
||||
item.setCreateUserId(UserUtil.getUserId());
|
||||
item.setCreateUserName(UserUtil.getUserName());
|
||||
item.setCreateTime(LocalDateTime.now());
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
<select id="search" resultType="com.nflg.wms.common.pojo.vo.PackingVO">
|
||||
select a.*,b.supplier_code,b.supplier_name from wms_package a
|
||||
left join user_supplier b on a.supplier_id=b."id"
|
||||
left join user_supplier b on a.supplier_id=b.user_id
|
||||
<where>
|
||||
<if test="request.packingCode !=null and request.packingCode !=''">
|
||||
and a.package_code ilike concat('%', #{request.packingCode}, '%')
|
||||
|
|
|
|||
Loading…
Reference in New Issue