diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeign.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeign.java index 7c83a164d8..794e441b6a 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeign.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeign.java @@ -132,4 +132,8 @@ public interface BaseDistributorFeign { @ApiOperation("移动-经销商附件清单保存修改") @PostMapping("/saveDistributorFileInfo") ResultBean saveDistributorFileInfo(@RequestBody BaseFileDto dto); + + @ApiOperation("二级经销商列表") + @GetMapping("/selectDisList") + ResultBean> selectDisList(@SpringQueryMap BaseDistributorListQuery query); } \ No newline at end of file diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeignFallback.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeignFallback.java index 6db9939ee8..fb16cd8006 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeignFallback.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeignFallback.java @@ -142,5 +142,10 @@ public class BaseDistributorFeignFallback implements BaseDistributorFeign { return null; } + @Override + public ResultBean> selectDisList(BaseDistributorListQuery query) { + return null; + } + } \ No newline at end of file diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListQuery.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListQuery.java new file mode 100644 index 0000000000..479d5547df --- /dev/null +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListQuery.java @@ -0,0 +1,16 @@ +package com.yxt.anrui.base.api.basedistributor; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/9/26 15:11 + * @Description + */ +@Data +public class BaseDistributorListQuery implements Query { + private static final long serialVersionUID = -7474049355274135681L; + + private String userSid; +} diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListVo.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListVo.java new file mode 100644 index 0000000000..bcf7c1ae9c --- /dev/null +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListVo.java @@ -0,0 +1,19 @@ +package com.yxt.anrui.base.api.basedistributor; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/9/26 14:56 + * @Description + */ +@Data +public class BaseDistributorListVo implements Vo { + private static final long serialVersionUID = 7567158573644935938L; + + private String name; + private String sid; + + +} diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOut.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOut.java index 82962a33e2..a6ff4431ed 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOut.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOut.java @@ -48,4 +48,10 @@ public class BaseVehicleOut extends BaseEntity { private String actualCustomer; @ApiModelProperty("实际购车人电话") private String actualMobile; + @ApiModelProperty("实际购车人sid") + private String actualSid; + @ApiModelProperty("二次经销商sid") + private String distributorSid; + @ApiModelProperty("客户sid") + private String customerSid; } diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutDto.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutDto.java index f37830d579..1ac6a38eb3 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutDto.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutDto.java @@ -35,12 +35,16 @@ public class BaseVehicleOutDto implements Dto { private String isTerminal; @ApiModelProperty("客户名称") private String customerName; + @ApiModelProperty("客户sid") + private String customerSid; @ApiModelProperty("手机号") private String mobile; @ApiModelProperty("赠品说明") private String giftsDescription; @ApiModelProperty("二次经销商") private String distributorName; + @ApiModelProperty("二次经销商sid") + private String distributorSid; @ApiModelProperty("返利金额") private String rebateAmount; @@ -48,4 +52,6 @@ public class BaseVehicleOutDto implements Dto { private String actualCustomer; @ApiModelProperty("实际购车人电话") private String actualMobile; + @ApiModelProperty("实际购车人sid") + private String actualSid; } diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.java index b72e173bfa..d7f72222c9 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.java @@ -118,4 +118,6 @@ public interface BaseDistributorMapper extends BaseMapper { BaseDistributor selectBySidOne(String sid); void updateInvoiceBySid(@Param("invoBankNum") String invoBankNum, @Param("invoBank") String invoBank, @Param("invoPhone") String invoPhone, @Param("sid") String sid); + + List selectDisList(String orgSid); } \ No newline at end of file diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.xml b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.xml index 18b9d8ee81..0532174017 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.xml +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.xml @@ -187,4 +187,11 @@ invoBank = #{invoBank} where sid = #{sid} + + \ No newline at end of file diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorRest.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorRest.java index 91cd29691e..47d494a470 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorRest.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorRest.java @@ -249,4 +249,9 @@ public class BaseDistributorRest implements BaseDistributorFeign { public ResultBean saveDistributorFileInfo(BaseFileDto dto) { return baseDistributorService.saveDistributorFileInfo(dto); } + + @Override + public ResultBean> selectDisList(BaseDistributorListQuery query) { + return baseDistributorService.selectDisList(query); + } } diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorService.java index d40b991726..73d932ea70 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorService.java @@ -754,4 +754,12 @@ public class BaseDistributorService extends MybatisBaseService> selectDisList(BaseDistributorListQuery query) { + ResultBean> rb = ResultBean.fireFail(); + String orgSid = sysStaffOrgFeign.getPathSidByUserSid(query.getUserSid()).getData(); + List list = baseMapper.selectDisList(orgSid); + list.removeAll(Collections.singleton(null)); + return rb.success().setData(list); + } } \ No newline at end of file diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleService.java index 9fcb95ffcb..82db1d4e63 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleService.java @@ -803,7 +803,7 @@ public class BaseVehicleService extends MybatisBaseService wrapper.eq("bv.vehicleState", VehicleState.StockEnum.STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.ING_STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.DR_STOCK.getCode())); qw.eq("bv.lockedState", VehicleState.LockEnum.UN_LOCK.getCode()); - qw.eq("bv.isProblemVeh","0"); + qw.eq("bv.isProblemVeh", "0"); } return qw; } @@ -1697,7 +1697,9 @@ public class BaseVehicleService extends MybatisBaseService qw = new QueryWrapper<>(); qw.and(wrapper -> wrapper.eq("bv.vehicleState", VehicleState.StockEnum.STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.RETURNING_STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.DCZ_STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.DR_STOCK.getCode())); - qw.notIn("bv.vinNo", vinNoList); + if (vinNoList.size() > 0) { + qw.notIn("bv.vinNo", vinNoList); + } List list = baseMapper.selectInventoryRecords(userOrgSid, qw); return rb.success().setData(list); } diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesService.java index dd3dfefb6d..dd68005c4f 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesService.java @@ -382,6 +382,16 @@ public class BaseVehicleActualSalesService extends MybatisBaseService detailsList = dto.getDetailsList(); + for (BaseVehicleActualDetailsDto f : detailsList) { + BaseVehicle baseVehicle = baseVehicleService.selectByVinNoAndOrgSid(f.getVinNo(), useOrgSid); + baseVehicle.setVinNo(f.getVinNo()); + baseVehicle.setSettlementStatus(VehicleState.BuyoutEnum.PRE_BUYOUT.getCode()); + baseVehicle.setSettlementStatusValue(VehicleState.BuyoutEnum.PRE_BUYOUT.getRemarks()); + baseVehicleService.updateVeh(baseVehicle); + } bv.setTaskId(baseVehicleActualSales.getTaskId()); bv.setTaskDefKey(baseVehicleActualSales.getNodeId()); bv.setComment("重新提交"); diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java index d07dc6c1e2..93b80f3b8b 100644 --- a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java @@ -8,6 +8,7 @@ import com.yxt.common.core.vo.PagerVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -149,6 +150,11 @@ public interface CrmCustomerTempFeign { @ResponseBody @GetMapping("/selectCustomerFile/{customerSid}") - public ResultBean> selectCustomerFile(@PathVariable("customerSid")String customerSid); + public ResultBean> selectCustomerFile(@PathVariable("customerSid") String customerSid); + + @ResponseBody + @GetMapping("/selectCustomerList") + @ApiOperation("查询该分公司业务员下的客户列表") + ResultBean> selectCustomerList(@SpringQueryMap CrmCustomerTempListQuery query); } \ No newline at end of file diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java index 551ea612e5..082e12e22f 100644 --- a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java @@ -120,5 +120,10 @@ public class CrmCustomerTempFeignFallback implements CrmCustomerTempFeign { return null; } + @Override + public ResultBean> selectCustomerList(CrmCustomerTempListQuery query) { + return null; + } + } \ No newline at end of file diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListQuery.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListQuery.java new file mode 100644 index 0000000000..97255c2000 --- /dev/null +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListQuery.java @@ -0,0 +1,17 @@ +package com.yxt.anrui.crm.api.crmcustomertemp; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/9/26 14:30 + * @Description + */ +@Data +public class CrmCustomerTempListQuery implements Query { + private static final long serialVersionUID = -8235453055415557265L; + + private String userSid; + private String staffSid; +} diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListVo.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListVo.java new file mode 100644 index 0000000000..5c7958c9df --- /dev/null +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListVo.java @@ -0,0 +1,19 @@ +package com.yxt.anrui.crm.api.crmcustomertemp; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/9/26 14:28 + * @Description + */ +@Data +public class CrmCustomerTempListVo implements Vo { + private static final long serialVersionUID = 5338688085476236821L; + + private String name; + private String sid; + private String mobile; + +} diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.java index d717d7a8b4..2105142b36 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.java @@ -118,4 +118,5 @@ public interface CrmCustomerTempMapper extends BaseMapper { CrmCustomerTempVo selByMobile(@Param("mobile") String mobile); + List selectCustomerList(@Param("orgSid") String orgSid, @Param("staffSid") String staffSid); } \ No newline at end of file diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.xml b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.xml index 2fc3dc7661..ffe5a53526 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.xml +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.xml @@ -205,4 +205,11 @@ FROM crm_customer_temp WHERE mobile = #{mobile} + + \ No newline at end of file diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java index 040143a4fa..faaed9f779 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java @@ -268,5 +268,10 @@ public class CrmCustomerTempRest implements CrmCustomerTempFeign { return crmCustomerFileService.selectCustomerFile(customerSid); } + @Override + public ResultBean> selectCustomerList(CrmCustomerTempListQuery query) { + return crmCustomerTempService.selectCustomerList(query); + } + } diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java index 96088ff15a..c2dcddd659 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java @@ -23,6 +23,7 @@ import com.yxt.anrui.crm.biz.crmvehicledemand.CrmVehicledemandService; import com.yxt.anrui.crm.biz.crmvisit.CrmVisitService; import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign; import com.yxt.anrui.portal.api.dictcommon.DictCommonVo; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserInfoVo; import com.yxt.anrui.portal.api.sysuser.SysUserVo; @@ -85,6 +86,8 @@ public class CrmCustomerTempService extends MybatisBaseService listPage(PagerQuery pq) { @@ -877,4 +880,14 @@ public class CrmCustomerTempService extends MybatisBaseService> selectCustomerList(CrmCustomerTempListQuery query) { + ResultBean> rb = ResultBean.fireFail(); + String staffSid = query.getStaffSid(); + //根据用户sid查询分公司sid + String orgSid = sysStaffOrgFeign.getPathSidByUserSid(query.getUserSid()).getData(); + List list = baseMapper.selectCustomerList(orgSid, staffSid); + list.removeAll(Collections.singleton(null)); + return rb.success().setData(list); + } } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrgStaffVo.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrgStaffVo.java new file mode 100644 index 0000000000..64b868b1ee --- /dev/null +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrgStaffVo.java @@ -0,0 +1,17 @@ +package com.yxt.anrui.portal.api.sysorganization; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/9/26 11:48 + * @Description + */ +@Data +public class SysOrgStaffVo implements Vo { + private static final long serialVersionUID = -4311553944345419092L; + + private String staffName; + private String staffSid; +} diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeign.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeign.java index 053588b729..879377e42e 100644 --- a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeign.java +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeign.java @@ -1,6 +1,5 @@ package com.yxt.anrui.portal.api.sysorganization; -import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgVo; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; @@ -8,6 +7,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -134,4 +134,9 @@ public interface SysOrganizationFeign { @ResponseBody @ApiOperation("根据当前用户的所在组织获取当前用户所在的分公司") ResultBean getOrgSid(@PathVariable(value = "sid") String sid); + + @GetMapping("/selectOrgList") + @ResponseBody + @ApiOperation("当前分公司销售部门及部门人员") + ResultBean> selectOrgList(@SpringQueryMap SysOrganizationListQuery query); } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeignFallback.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeignFallback.java index 6484d77eca..a7bd307be5 100644 --- a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeignFallback.java +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeignFallback.java @@ -137,4 +137,9 @@ public class SysOrganizationFeignFallback implements SysOrganizationFeign { public ResultBean getOrgSid(String sid) { return null; } + + @Override + public ResultBean> selectOrgList(SysOrganizationListQuery query) { + return null; + } } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListQuery.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListQuery.java new file mode 100644 index 0000000000..debd0cf119 --- /dev/null +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListQuery.java @@ -0,0 +1,16 @@ +package com.yxt.anrui.portal.api.sysorganization; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/9/26 11:49 + * @Description + */ +@Data +public class SysOrganizationListQuery implements Query { + private static final long serialVersionUID = 8657016527420117948L; + + private String userSid; +} diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListVo.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListVo.java new file mode 100644 index 0000000000..584bfb9b3b --- /dev/null +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListVo.java @@ -0,0 +1,23 @@ +package com.yxt.anrui.portal.api.sysorganization; + +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.List; + +/** + * @Author dimengzhe + * @Date 2022/9/26 11:42 + * @Description + */ +@Data +public class SysOrganizationListVo implements Vo { + private static final long serialVersionUID = -3709239161608411765L; + + private String orgDeptSid; + private String orgDeptName; + + private List staffinfoVoList; + + +} diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.java index bd391f31a5..d10355bfe8 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.java @@ -105,4 +105,7 @@ public interface SysOrganizationMapper extends BaseMapper { SysOrgVo getListOrgByBrand(String sid); + List selectOrgList(String orgSid); + + List selectByOrgDeptSid(String orgDeptSid); } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.xml b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.xml index 707f11b47b..9a0dd40813 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.xml +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.xml @@ -5,26 +5,26 @@ SELECT * - FROM sys_organization LIMIT 0,1 + FROM sys_organization + LIMIT 0,1 SELECT so.name, so.psid, so.id, so.sid, so.orgSidPath FROM sys_organization so - WHERE isDept = 0 AND so.sid = #{sid} + WHERE isDept = 0 + AND so.sid = #{sid} ORDER BY psid + + + + \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java index 7ecd5563b7..eaa7f0230c 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java @@ -356,4 +356,9 @@ public class SysOrganizationRest implements SysOrganizationFeign { String orgSid = sysOrganizationService.getOrgSid(sid); return rb.success().setData(orgSid); } + + @Override + public ResultBean> selectOrgList(SysOrganizationListQuery query) { + return sysOrganizationService.selectOrgList(query); + } } diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java index ca0e262de6..31f1711941 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java @@ -477,4 +477,22 @@ public class SysOrganizationService extends MybatisBaseService> selectOrgList(SysOrganizationListQuery query) { + ResultBean> rb = ResultBean.fireFail(); + //根据用户sid查询分公司sid + String orgDeptSid = sysStaffOrgService.selectByUserSid(query.getUserSid()); + String orgSid = getOrgSid(orgDeptSid); + //根据分公司名称查询销售部门的部门 + List sysOrganizationListVos = baseMapper.selectOrgList(orgSid); + sysOrganizationListVos.removeAll(Collections.singleton(null)); + if (!sysOrganizationListVos.isEmpty()) { + for (SysOrganizationListVo vo : sysOrganizationListVos) { + orgDeptSid = vo.getOrgDeptSid(); + List sysOrgStaffVoList = baseMapper.selectByOrgDeptSid(orgDeptSid); + vo.setStaffinfoVoList(sysOrgStaffVoList); + } + } + return rb.success().setData(sysOrganizationListVos); + } } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java index 9384ef8d24..280bd0fc5c 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java @@ -102,4 +102,6 @@ public interface SysStaffOrgMapper extends BaseMapper { List selectByStaffS(String staffSid); List selectByOrgSid(String sid); + + String selectByUserSid(String userSid); } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.xml b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.xml index 1cbe120b0e..c6b98ab524 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.xml +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.xml @@ -90,6 +90,18 @@ + + \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java index 79cdc7715c..8afbc56ccb 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java @@ -281,4 +281,8 @@ public class SysStaffOrgService extends MybatisBaseService selectByOrgSid(String sid) { return baseMapper.selectByOrgSid(sid); } + + public String selectByUserSid(String userSid) { + return baseMapper.selectByUserSid(userSid); + } } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateVo.java index 8cc0034591..e328f83d33 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateVo.java @@ -74,7 +74,8 @@ public class ScmSpecialRebateVo implements Vo { @ApiModelProperty("预计返利") private String estimateRebate; // 预计返利 @ApiModelProperty("预提日期") - private String withholdingDate; // 预提日期 + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date withholdingDate; // 预提日期 @ApiModelProperty("预提日期(页面展示)") private String withholdingDateCopy; // 预提日期(页面展示) @ApiModelProperty("上传日期") diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyVo.java index 61e03989ea..1820960eff 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyVo.java @@ -64,7 +64,7 @@ public class ScmSpecialRebateWithApplyVo implements Vo { @ApiModelProperty("预提申请") private String withApply; // 预提申请 @ApiModelProperty("预提返利合计") - private String withRebateTotal; // 预提返利合计 + private Integer withRebateTotal; // 预提返利合计 @ApiModelProperty("创建人姓名") private String createByName; // 创建人姓名 @ApiModelProperty("使用组织sid") diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeign.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeign.java index ee9c33a61b..59b134a48f 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeign.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeign.java @@ -59,6 +59,11 @@ public interface ScmVehicleInventoryFeign { @ResponseBody public ResultBean> listPage(@RequestBody PagerQuery pq); + @ApiOperation("待盘库记录列表") + @PostMapping("/stayListPage") + @ResponseBody + public ResultBean> stayListPage(@RequestBody PagerQuery pq); + @ApiOperation("盘库修改状态") @PostMapping("/updateState") @ResponseBody diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeignFallback.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeignFallback.java index 8da5a7d7c2..fd63d33de2 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeignFallback.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeignFallback.java @@ -52,6 +52,11 @@ public class ScmVehicleInventoryFeignFallback implements ScmVehicleInventoryFeig return rb.setMsg("接口anrui_scm/scmvehicleinventory/listPage无法访问"); } + @Override + public ResultBean> stayListPage(PagerQuery pq) { + return null; + } + @Override public ResultBean updateState(String sid, String inventoryStateKey, String inventoryState, String certificateKey, String certificate, String remarks) { return null; diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryQuery.java index 44b1b1fbbb..d1a6f04421 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryQuery.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryQuery.java @@ -51,7 +51,7 @@ import lombok.Data; public class ScmVehicleInventoryQuery implements Query { @ApiModelProperty("车架号") - private String mainSid; // 车架号 + private String vinNo; // 车架号 @ApiModelProperty("盘库开始日期") @JsonProperty("InventStartDate") private String InventStartDate; diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryVo.java index 2f27047514..75cdbe5d91 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryVo.java @@ -56,9 +56,13 @@ public class ScmVehicleInventoryVo implements Vo { private String sid; // sid @ApiModelProperty("车架号") - private String mainSid; // 车架号 + private String vinNo; // 车架号 + @ApiModelProperty("主表sid") + private String mainSid; // 主表sid @ApiModelProperty("存放地点") private String location; // 存放地点 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid @ApiModelProperty("盘库日期") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date InventoryDate; // 盘库日期 diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleStayInventoryQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleStayInventoryQuery.java new file mode 100644 index 0000000000..5d6f62054a --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleStayInventoryQuery.java @@ -0,0 +1,58 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.scm.api.scmvehicleinventory; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: anrui_scm(anrui_scm)
+ * File: ScmVehicleInventoryQuery.java
+ * Class: anrui_scm.api.scmvehicleinventory.ScmVehicleInventoryQuery
+ * Description: 盘库记录 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-06-15 14:30:59
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "盘库记录 查询条件", description = "盘库记录 查询条件") +public class ScmVehicleStayInventoryQuery implements Query { + + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("存放地点sid") + private String locationSid; // 存放地点sid + @ApiModelProperty("创建组织") + private String createOrgSid; // 创建组织 +} diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java index 3a2e806918..b2f0bb47e6 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java @@ -83,6 +83,4 @@ public class AppScmVehInventorymonthVo implements Vo { private String normalNumber; @ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示") private Boolean showBtn; - - } diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java index dbc05bcfcf..6c375289ee 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java @@ -58,7 +58,7 @@ import java.util.List; fallback = ScmVehInventorymonthFeignFallback.class) public interface ScmVehInventorymonthFeign { - @ApiOperation("根据条件分页查询数据的列表") + @ApiOperation("PC端-获取盘库报告列表") @PostMapping("/listPage") @ResponseBody public ResultBean> listPage(@RequestBody PagerQuery pq); diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthQuery.java index bbb8f2367f..989c721f5d 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthQuery.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthQuery.java @@ -26,6 +26,7 @@ package com.yxt.anrui.scm.api.scmvehinventorymonth; +import com.fasterxml.jackson.annotation.JsonProperty; import com.yxt.common.core.query.Query; import io.swagger.annotations.ApiModel; @@ -49,15 +50,12 @@ import lombok.Data; @ApiModel(value = "月度盘库 查询条件", description = "月度盘库 查询条件") public class ScmVehInventorymonthQuery implements Query { - @ApiModelProperty("编号(yyyyMMdd)") - private String billNo; // 编号(yyyyMMdd) - @ApiModelProperty("创建组织") - private String createOrgSid; // 创建组织 - @ApiModelProperty("创建组织名称") - private String createOrgName; // 创建组织名称 - @ApiModelProperty("使用组织") - private String useOrgSid; // 使用组织 - @ApiModelProperty("使用组织名称") - private String useOrgName; // 使用组织名称 - + @ApiModelProperty("创建人姓名") + private String createByName; + @ApiModelProperty("创建开始日期") + private String createStartTime; // 创建开始日期 + @ApiModelProperty("创建结束日期") + private String createEndTime; // 创建结束日期 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid } diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthVo.java index edbbbdfd6c..286280f908 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthVo.java @@ -26,6 +26,7 @@ package com.yxt.anrui.scm.api.scmvehinventorymonth; +import com.fasterxml.jackson.annotation.JsonFormat; import com.yxt.common.core.vo.Vo; import io.swagger.annotations.ApiModel; @@ -52,18 +53,29 @@ import java.util.Date; public class ScmVehInventorymonthVo implements Vo { private String sid; // sid - - @ApiModelProperty("编号(yyyyMMdd)") + @ApiModelProperty("生成报告状态") + private String state; + @ApiModelProperty("编号(yyyyMMdd)") private String billNo; // 编号(yyyyMMdd) @ApiModelProperty("创建时间") - private Date createTime; // 使用组织名称 - @ApiModelProperty("创建组织") - private String createOrgSid; // 创建组织 - @ApiModelProperty("创建组织名称") - private String createOrgName; // 创建组织名称 - @ApiModelProperty("使用组织") - private String useOrgSid; // 使用组织 - @ApiModelProperty("使用组织名称") - private String useOrgName; // 使用组织名称 - + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; // + @ApiModelProperty("创建人") + private String createByName; + @ApiModelProperty("剩余盘库记录数量") + private String surplusNumber; + @ApiModelProperty("盘库记录总数数量") + private String totalNumber; + @ApiModelProperty("盘亏数量") + private String lossNumber; + @ApiModelProperty("盘损数量") + private String damageNumber; + @ApiModelProperty("盘盈数量") + private String profitNumber; + @ApiModelProperty("实盘数量") + private String actualNumber; + @ApiModelProperty("正常数量") + private String normalNumber; + @ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示") + private Boolean showBtn; } diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java index 7576ff1277..144c7dfb33 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java @@ -26,7 +26,11 @@ package com.yxt.anrui.scm.biz.scmspecialrebate; import com.yxt.anrui.scm.api.scmspecialrebate.*; +import com.yxt.anrui.scm.api.scmspecialrebatewithapply.ScmSpecialRebateWithApply; +import com.yxt.anrui.scm.api.scmspecialrebatewithapply.ScmSpecialRebateWithApplyVo; import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebate; +import com.yxt.anrui.scm.biz.scmspecialrebatewith.ScmSpecialRebateWithService; +import com.yxt.anrui.scm.biz.scmspecialrebatewithapply.ScmSpecialRebateWithApplyService; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; @@ -35,6 +39,8 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * Project: anrui-scm(专项返利管理)
* File: ScmSpecialRebateFeignFallback.java
@@ -55,6 +61,10 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign { @Autowired private ScmSpecialRebateService scmSpecialRebateService; + @Autowired + private ScmSpecialRebateWithService scmSpecialRebateWithService; + @Autowired + private ScmSpecialRebateWithApplyService scmSpecialRebateWithApplyService; @Override @ApiOperation("根据条件分页查询数据的列表") @@ -85,6 +95,13 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign { public ResultBean delBySids(@RequestBody String[] sids){ ResultBean rb = ResultBean.fireFail(); for (String sid : sids) { + List stringList = scmSpecialRebateWithService.fetchBySpecialReBateSid(sid); + for (String s : stringList) { + ScmSpecialRebateWithApply scmSpecialRebateWithApply = scmSpecialRebateWithApplyService.fetchBySid(s); + if (!scmSpecialRebateWithApply.getNodeState().equals("待提交")){ + return rb.setMsg("所选数据中包含已提交专项返利信息,无法删除"); + } + } ScmSpecialRebate scmSpecialRebate = scmSpecialRebateService.fetchBySid(sid); Integer state = scmSpecialRebate.getState(); if (state == 1){ diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java index 09a459ce51..8a3d99151e 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java @@ -227,10 +227,9 @@ public class ScmSpecialRebateService extends MybatisBaseService page = PagerUtil.queryToPage(pq); IPage pagging = baseMapper.selectPageVo(page, qw); for (ScmSpecialRebateVo record : pagging.getRecords()) { - String withholdingDate = record.getWithholdingDate(); - Date parse = DateUtil.parse(withholdingDate); - int year = DateUtil.year(parse); - int month = DateUtil.month(parse) + 1; + Date withholdingDate = record.getWithholdingDate(); + int year = DateUtil.year(withholdingDate); + int month = DateUtil.month(withholdingDate) + 1; String withholdingDateCopy = year + "年" + month + "月"; record.setWithholdingDateCopy(withholdingDateCopy); } diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java index 12c23b74fb..ec6a9eaf7a 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java @@ -38,6 +38,7 @@ import com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWith; import com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithVo; import java.util.List; +import java.util.Map; /** * Project: anrui-scm(专项返利)
@@ -72,4 +73,6 @@ public interface ScmSpecialRebateWithMapper extends BaseMapper fetchSpecialReBateSidByMainSid(String businessSid); + + List fetchBySpecialReBateSid(String sid); } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml index 81d0c7d72f..c4c0d9e010 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml @@ -29,4 +29,8 @@ WHERE ssrw.`mainSid` = #{sid} GROUP BY ssr.`calculationModeKey` + + \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithService.java index e2a7714fb3..3d78a28d34 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithService.java @@ -48,6 +48,7 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * Project: anrui-scm(专项返利)
@@ -140,4 +141,8 @@ public class ScmSpecialRebateWithService extends MybatisBaseService fetchBySpecialReBateSid(String sid) { + return baseMapper.fetchBySpecialReBateSid(sid); + } } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java index 15bc378e61..87f03503ff 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java @@ -677,10 +677,25 @@ public class ScmVehicleGressionService extends MybatisBaseService scmVehicleGressionVehDtos = dto.getScmVehicleGressionVehs(); + String vinNo = ""; + for (ScmVehicleGressionVehDto v : scmVehicleGressionVehDtos) { + //根据车辆sid查询存放地点是否与该存放地点一致。将不一致的查询出来 + ResultBean baseVehicleSelectVoResultBean = baseVehicleFeign.details(v.getVehSid()); + if (!baseVehicleSelectVoResultBean.getSuccess()) { + return rb.setMsg("选择的车辆中包含车辆不存在的数据"); + } + BaseVehicleSelectVo baseVehicleSelectVo = baseVehicleSelectVoResultBean.getData(); + if (!dto.getLocationSid().equals(baseVehicleSelectVo.getLocation())) { + vinNo = v.getVehVin() + ","; + } + } + if (StringUtils.isNotBlank(vinNo)) { + vinNo = vinNo.replace(",", ""); + return rb.setMsg(vinNo + "的车辆不再该现存放地点内"); + } + //判断要提交的车辆sid是否存在于临时表中 for (ScmVehicleGressionVehDto v : scmVehicleGressionVehDtos) { List carSidList = baseVehicleTempstateFeign.selectAll("001").getData(); for (BaseVehicleTempstateVo vv : carSidList) { diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryRest.java index 32b4ce38ff..5b0a10c4f5 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryRest.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryRest.java @@ -70,6 +70,13 @@ public class ScmVehicleInventoryRest implements ScmVehicleInventoryFeign { return rb.success().setData(pv); } + @Override + public ResultBean> stayListPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = scmVehicleInventoryService.stayListPage(pq); + return rb.success().setData(pv); + } + @Override public ResultBean updateState(String sid, String inventoryStateKey, String inventoryState, String certificateKey, String certificate, String remarks) { return scmVehicleInventoryService.updateState(sid, inventoryStateKey, inventoryState, remarks); diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java index ff3183a3c3..f0056a8c64 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java @@ -35,6 +35,7 @@ import com.yxt.anrui.base.api.basevehicle.BaseVehicleVo; import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; import com.yxt.anrui.scm.api.scmfile.ScmFile; import com.yxt.anrui.scm.api.scmvehicleinventory.*; +import com.yxt.anrui.scm.api.scmvehicleinventory.ScmVehicleStayInventoryQuery; import com.yxt.anrui.scm.api.scmvehiclepatrolinspectionsheet.ScmVehiclePatrolinspectionsheetDto; import com.yxt.anrui.scm.api.scmvehiclestayinventory.*; import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo; @@ -104,8 +105,8 @@ public class ScmVehicleInventoryService extends MybatisBaseService qw = new QueryWrapper<>(); qw.eq("createOrgSid", query.getCreateOrgSid()); - if (StringUtils.isNotBlank(query.getMainSid())) { - qw.like("mainSid", query.getMainSid()); + if (StringUtils.isNotBlank(query.getVinNo())) { + qw.like("vinNo", query.getVinNo()); } if (StringUtils.isNotBlank(query.getLocationSid())) { qw.eq("locationSid", query.getLocationSid()); @@ -113,14 +114,34 @@ public class ScmVehicleInventoryService extends MybatisBaseService= date_format('" + inventStartDate + "','%Y-%m-%d')"). apply(StringUtils.isNotEmpty(inventEndDate), "date_format (InventoryDate,'%Y-%m-%d') <= date_format('" + inventEndDate + "','%Y-%m-%d')" ); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + public PagerVo stayListPage(PagerQuery pq) { + ScmVehicleStayInventoryQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("createOrgSid", query.getCreateOrgSid()); + if (StringUtils.isNotBlank(query.getVinNo())) { + qw.like("vinNo", query.getVinNo()); + } + if (StringUtils.isNotBlank(query.getLocationSid())) { + qw.eq("locationSid", query.getLocationSid()); + } + qw.eq("InventoryStateKey", ""); IPage page = PagerUtil.queryToPage(pq); IPage pagging = baseMapper.selectPageVo(page, qw); + for (ScmVehicleInventoryVo record : pagging.getRecords()) { + record.setInventoryState(""); + } PagerVo p = PagerUtil.pageToVo(pagging, null); return p; } diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml index 5c17002d35..c881494b05 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml @@ -4,7 +4,15 @@ diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java index c2a3a1b6af..8f58fc320c 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java @@ -97,9 +97,38 @@ public class ScmVehInventorymonthService extends MybatisBaseService listPageVo(PagerQuery pq) { ScmVehInventorymonthQuery query = pq.getParams(); - QueryWrapper qw = createQueryWrapper(query); + QueryWrapper qw = new QueryWrapper<>(); + String createStartTime = query.getCreateStartTime(); + String createEndTime = query.getCreateEndTime(); + qw.eq("createOrgSid", query.getCreateOrgSid()); + qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). + apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" + ); + if (StringUtils.isNotBlank(query.getCreateByName())) { + qw.like("createByName", query.getCreateByName()); + } + qw.orderByDesc("id"); IPage page = PagerUtil.queryToPage(pq); IPage pagging = baseMapper.selectPageVo(page, qw); + for (ScmVehInventorymonthVo record : pagging.getRecords()) { + String mainSid = record.getSid(); + AppVehInventorymonthVo vo = scmVehicleInventoryService.getMonthByMainSid(mainSid); + record.setSurplusNumber(String.valueOf(vo.getSurplusNumber())); + record.setTotalNumber(String.valueOf(vo.getTotalNumber())); + record.setLossNumber(String.valueOf(vo.getLossNumber())); + record.setDamageNumber(String.valueOf(vo.getDamageNumber())); + record.setProfitNumber(String.valueOf(vo.getProfitNumber())); + record.setActualNumber(String.valueOf(vo.getProfitNumber() + vo.getNormalNumber() + vo.getDamageNumber() + vo.getLossNumber())); + if ("0".equals(record.getState())) { + if (vo.getSurplusNumber() == 0) { + record.setShowBtn(true); + } else { + record.setShowBtn(false); + } + } else { + record.setShowBtn(false); + } + } PagerVo p = PagerUtil.pageToVo(pagging, null); return p; } @@ -151,8 +180,10 @@ public class ScmVehInventorymonthService extends MybatisBaseService 0) { for (AppScmVehicleCarInventoryListPageVo vehicleCarInventoryListPageVo : vehicleCarInventoryListPageVos) { ScmVehInventorymonth scmVehInventorymonth = fetchBySid(vehicleCarInventoryListPageVo.getMainSid()); - if (scmVehInventorymonth.getState() == 0) { - return rb.setMsg("上次盘库记录未生成报告,请先生成再操作!"); + if (scmVehInventorymonth != null) { + if (scmVehInventorymonth.getState() == 0) { + return rb.setMsg("上次盘库记录未生成报告,请先生成再操作!"); + } } } } diff --git a/anrui-scm/anrui-scm-ui/src/api/kucunguanli/panku.js b/anrui-scm/anrui-scm-ui/src/api/kucunguanli/panku.js index 778fb69d68..5189fb5c4e 100644 --- a/anrui-scm/anrui-scm-ui/src/api/kucunguanli/panku.js +++ b/anrui-scm/anrui-scm-ui/src/api/kucunguanli/panku.js @@ -10,44 +10,55 @@ export default { headers: { 'Content-Type': 'application/json' } }) }, - // 查询分页列表(待盘库记录列表) + // 判断是否生成盘库记录 + getInventoryRecords: function(userSid) { + return request({ + url: '/scm/v1/scmvehinventorymonth/getInventoryRecords/' + userSid, + method: 'get' + }) + }, + // 盘库操作(库存车辆列表) pagelist: function(data) { return request({ - url: '/scm/v1/scmvehiclestayinventory/listPage', + url: '/scm/v1/scmvehicleinventory/stayListPage', method: 'post', data: data, headers: { 'Content-Type': 'application/json' } }) }, - // 判断是否生成盘库记录 - getInventoryRecords: function(userSid) { + // 盘库操作(库存车辆列表--点击确认) + saveInventory: function(data) { return request({ - url: '/scm/v1/scmvehiclestayinventory/getInventoryRecords/' + userSid, - method: 'get' + url: '/scm/v1/scmvehicleinventory/saveInventory', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } }) }, - // 待办库列表点击确认 - saveInventory: function(data) { + // 盘库报告列表 + baoGao: function(data) { return request({ - url: 'scm/v1/scmvehicleinventory/saveInventory', + url: '/scm/v1/scmvehinventorymonth/listPage', method: 'post', data: data, headers: { 'Content-Type': 'application/json' } }) }, - // 保存 - updateState: function(data) { + // 盘库报告列表(生成盘库记录) + getCarInventoryReport: function(data) { return request({ - url: '/scm/v1/scmvehicleinventory/updateState', - method: 'post', - params: data, + url: '/scm/v1/scmvehinventorymonth/getCarInventoryReport/' + data, + method: 'get', }) }, - // 通过sid查询一条记录 - fetchBySid: function(sid) { + // 盘库报告列表(生成盘库记录) + sendReport: function(data) { return request({ - url: '/base/v1/basemodelmodprice/fetchBySid/' + sid, - method: 'get' + url: '/scm/v1/scmvehinventoryreport/sendReport', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } }) - } + }, + } diff --git a/anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_morebypicture.vue b/anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_morebypicture.vue new file mode 100644 index 0000000000..cd6d09d39d --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_morebypicture.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuAdd.vue b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuAdd.vue index 5b75f0e0c7..8e88cc7ea8 100644 --- a/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuAdd.vue @@ -37,7 +37,7 @@
车架号:
- +
@@ -49,6 +49,7 @@
库存车辆列表
+ 盘盈
@@ -57,9 +58,9 @@ 确认 - + @@ -77,9 +78,9 @@ {{ scope.row.lastName }} - + @@ -93,15 +94,20 @@ + diff --git a/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoAdd.vue b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoAdd.vue new file mode 100644 index 0000000000..20832ce3a5 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoAdd.vue @@ -0,0 +1,198 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoInfo.vue b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoInfo.vue new file mode 100644 index 0000000000..fd86d47ccc --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoInfo.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoguanli.vue b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoguanli.vue new file mode 100644 index 0000000000..ab18adfb6f --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoguanli.vue @@ -0,0 +1,256 @@ + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuguanli.vue b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuguanli.vue index b910706dd5..f6031c7ad1 100644 --- a/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuguanli.vue +++ b/anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuguanli.vue @@ -14,7 +14,7 @@ - + @@ -22,9 +22,9 @@ - - - + + + @@ -42,32 +42,27 @@
- - - - + - + - + - + @@ -86,52 +81,7 @@
- - - - -
车架号
- {{ formobj.mainSid }} -
-
- - -
盘库日期
- {{ formobj.InventoryDate }} -
- -
存放地点
- {{ formobj.location }} -
-
- - -
盘库人员
- {{ formobj.inventoryName }} -
- -
状态
- - - - - -
-
- - -
备注
- - - -
-
-
- - 确 定 - 取 消 - -
+ @@ -141,7 +91,8 @@ import pageye from '@/components/pagination/pageye' import ButtonBar from '@/components/ButtonBar' import req from '@/api/kucunguanli/panku' import pankuAdd from './pankuAdd' -import {fetchByUseOrgSid, getPathSidByUserSid, typeValues} from '@/api/cheliang/dictcommons' +import pankubaogaoguanli from './pankubaogao/pankubaogaoguanli' +import { fetchByUseOrgSid, getPathSidByUserSid, typeValues } from '@/api/cheliang/dictcommons' export default { name: 'pankuguanli', @@ -149,12 +100,12 @@ export default { Pagination, pageye, ButtonBar, - pankuAdd + pankuAdd, + pankubaogaoguanli }, data() { return { btndisabled: false, - dialogVisible: false, btnList: [ { type: 'primary', @@ -163,6 +114,13 @@ export default { btnKey: 'toAdd', btnLabel: '生成盘库记录' }, + { + type: 'primary', + size: 'small', + icon: '', + btnKey: 'toReport', + btnLabel: '盘库报告' + }, { type: 'primary', size: 'small', @@ -184,18 +142,8 @@ export default { // 查询条件 ----------- tableKey: 0, list: [], - formobj: {}, warehouse_list: [], - stateType_list: [ - { - dictKey: 1, - dictValue: '通过' - }, - { - dictKey: 2, - dictValue: '不通过' - } - ], + stateType_list: [], FormLoading: false, listLoading: false, listQuery: { @@ -203,8 +151,8 @@ export default { InventStartDate: '', InventEndDate: '', locationSid: '', - mainSid: '', - InventoryState: '', + vinNo: '', + InventoryStateKey: '', createOrgSid: '' }, current: 1, @@ -223,17 +171,22 @@ export default { }, methods: { init() { + typeValues({ type: 'inventoryResult' }).then((resp) => { + if (resp.success) { + this.stateType_list = resp.data + } + }) getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => { if (res.success) { this.listQuery.params.createOrgSid = res.data + fetchByUseOrgSid({ sid: this.listQuery.params.createOrgSid }).then((res) => { + if (res.success) { + this.warehouse_list = res.data + } + }) this.getList() } }) - fetchByUseOrgSid({ sid: this.listQuery.params.createOrgSid }).then((res) => { - if (res.success) { - this.warehouse_list = res.data - } - }) }, // 搜索条件效果 clicksearchShow() { @@ -250,6 +203,9 @@ export default { case 'toAdd': this.toAdd() break + case 'toReport': + this.toReport() + break case 'toEdit': this.toEdit() break @@ -281,18 +237,6 @@ export default { } }) }, - changeStateType(value) { - let bb = null - this.stateType_list.forEach((e) => { - if (e.dictValue === value) { - bb = { - key: e.dictKey, - value: e.dictValue - } - } - }) - this.formobj.InventoryStateKey = bb.key - }, // 查询按钮 handleFilter() { this.listQuery.current = 1 @@ -304,8 +248,8 @@ export default { InventStartDate: '', InventEndDate: '', locationSid: '', - mainSid: '', - InventoryState: '', + vinNo: '', + InventoryStateKey: '', createOrgSid: '' }, current: 1, @@ -314,19 +258,6 @@ export default { } this.init() }, - handleSave(row) { - this.formobj = row - this.dialogVisible = true - }, - handleQueDing() { - req.updateState(this.formobj).then((res) => { - this.dialogVisible = false - if (res.success) { - this.$message({ showClose: true, type: 'success', message: res.msg }) - this.getList() - } - }) - }, toAdd() { req.getInventoryRecords(window.sessionStorage.getItem('userSid')).then((res) => { if (res.success) { @@ -334,6 +265,10 @@ export default { } }) }, + toReport() { + this.viewState = 3 + this.$refs['divBaoGao'].init() + }, toEdit() { this.viewState = 2 this.$refs['divAdd'].showEdit(this.listQuery.params.createOrgSid) @@ -349,10 +284,12 @@ export default { } diff --git a/doc/databases/base_tables.sql b/doc/databases/base_tables.sql index 3cfd4399d8..f9fb530dbb 100644 --- a/doc/databases/base_tables.sql +++ b/doc/databases/base_tables.sql @@ -922,10 +922,13 @@ CREATE TABLE `base_vehicle_out` `isTerminal` varchar(64) DEFAULT NULL COMMENT '是否为终端客户', `customerName` varchar(255) DEFAULT NULL COMMENT '客户名称', `mobile` varchar(255) DEFAULT NULL COMMENT '手机号', + `customerSid` varchar(255) DEFAULT NULL COMMENT '客户sid', `actualCustomer` varchar(255) DEFAULT NULL COMMENT '实际购车人名称', `actualMobile` varchar(255) DEFAULT NULL COMMENT '实际购车人手机号', + `actualSid` varchar(255) DEFAULT NULL COMMENT '实际购车人sid', `giftsDescription` varchar(255) DEFAULT NULL COMMENT '赠品说明', `distributorName` varchar(255) DEFAULT NULL COMMENT '二次经销商', + `distributorSid` varchar(255) DEFAULT NULL COMMENT '二次经销商sid', `rebateAmount` varchar(255) DEFAULT NULL COMMENT '返利金额', PRIMARY KEY (`id`), KEY `id` (`id`)