Browse Source

1.新增映射品类子类功能

dev
zhenghaoyu 1 month ago
parent
commit
762a713f97
  1. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java
  2. 58
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataMainCategoryEntity.java
  3. 1
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/MerchantStatisticsDTO.java
  4. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/AdvanceDTO.java
  5. 3
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java
  6. 106
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataForwardingUnitController.java
  7. 111
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataMainCategoryController.java
  8. 31
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataMainController.java
  9. 27
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/ForwardingUnitDTO.java
  10. 23
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/MainDTO.java
  11. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataForwardingUnitMapper.java
  12. 34
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataForwardingUnitMapper.xml
  13. 16
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataMainCategoryMapper.java
  14. 24
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataMainCategoryMapper.xml
  15. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataMainMapper.java
  16. 12
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataMainMapper.xml
  17. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataForwardingUnitService.java
  18. 15
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataMainCategoryService.java
  19. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataMainService.java
  20. 51
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataForwardingUnitServiceImpl.java
  21. 58
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataMainCategoryServiceImpl.java
  22. 10
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataMainServiceImpl.java
  23. 13
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml
  24. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/config/ExecutorConfig.java
  25. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  26. 29
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  27. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java
  28. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java
  29. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

7
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java

@ -250,4 +250,11 @@ public class BasicdataClientEntity extends TenantEntity {
@ApiModelProperty(value = "是否是新用户 0否 1是")
private Integer isNew;
@ApiModelProperty(value = "主体id ")
private Long mainId;
@ApiModelProperty(value = "主体名称 ")
private String mainName;
}

58
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataMainCategoryEntity.java

@ -0,0 +1,58 @@
package com.logpm.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_basicdata_main_category")
@ApiModel(value = "BasicdataMainCategory对象", description = "物料映射子表")
@EqualsAndHashCode(callSuper = true)
public class BasicdataMainCategoryEntity extends TenantEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "映射品类id")
private Long factoryCategoryId;
@ApiModelProperty(value = "品类id")
private Long categoryId;
@ApiModelProperty(value = "品类名称")
private String category;
@ApiModelProperty(value = "主体id")
private Long mainId;
@ApiModelProperty(value = "主体名称")
private String mainName;
}

1
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/MerchantStatisticsDTO.java

@ -49,6 +49,7 @@ public class MerchantStatisticsDTO implements Serializable {
* 运单号
*/
private String waybillNo;
private List<String> waybillNos;
/**
* 订单号
*/

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/AdvanceDTO.java

@ -56,6 +56,7 @@ public class AdvanceDTO implements Serializable {
private Integer isTimeOut;
private Long clientId;
private Long mainId;
}

3
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillClient.java

@ -109,4 +109,7 @@ public interface IWarehouseWaybillClient {
@GetMapping(API_PREFIX + "/findWaybillVOByOrderCode")
List<WarehouseWaybillEntity> findWaybillVOByOrderCode(@RequestParam String orderCode);
@GetMapping(API_PREFIX+"/deleteAllByWaybillId")
void deleteAllByWaybillId(@RequestParam Long waybillId);
}

106
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataForwardingUnitController.java

@ -0,0 +1,106 @@
package com.logpm.basicdata.controller;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.dto.ForwardingUnitDTO;
import com.logpm.basicdata.entity.BasicdataForwardingUnitEntity;
import com.logpm.basicdata.service.IBasicdataForwardingUnitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Objects;
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/forwardingUnit")
@Api(value = "始发仓默认发货单位", tags = "始发仓默认发货单位")
public class BasicdataForwardingUnitController {
private final IBasicdataForwardingUnitService basicdataForwardingUnitService;
@ResponseBody
@PostMapping("/pageList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "默认发货单位列表", notes = "传入forwardingUnitDTO")
public R pageList(@RequestBody ForwardingUnitDTO forwardingUnitDTO) {
String method = "############pageList: ";
log.info(method + "请求参数{}", forwardingUnitDTO);
try {
IPage<BasicdataForwardingUnitEntity> pages = basicdataForwardingUnitService.pageList(forwardingUnitDTO);
return R.data(pages);
} catch (CustomerException e) {
log.error(e.message, e);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常", e);
return R.fail(500, method + "系统异常");
}
}
@ResponseBody
@PostMapping("/editUnit")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增或更新默认发货单位", notes = "传入forwardingUnitDTO")
public R editUnit(@RequestBody ForwardingUnitDTO forwardingUnitDTO) {
String method = "############editUnit: ";
log.info(method + "请求参数{}", forwardingUnitDTO);
try {
Long warehouseId = forwardingUnitDTO.getWarehouseId();
if(Objects.isNull(warehouseId)){
log.warn(method+"仓库id为空");
return R.fail(405,"仓库id为空");
}
Long clientId = forwardingUnitDTO.getClientId();
if(Objects.isNull(clientId)){
log.warn(method+"客户id为空");
return R.fail(405,"客户id为空");
}
return basicdataForwardingUnitService.editUnit(forwardingUnitDTO);
} catch (CustomerException e) {
log.error(e.message, e);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常", e);
return R.fail(500, method + "系统异常");
}
}
@ResponseBody
@PostMapping("/removeUnit")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除默认发货单位", notes = "传入forwardingUnitDTO")
public R removeUnit(@RequestBody ForwardingUnitDTO forwardingUnitDTO) {
String method = "############removeUnit: ";
log.info(method + "请求参数{}", forwardingUnitDTO);
try {
List<Long> ids = forwardingUnitDTO.getIds();
if(CollUtil.isEmpty(ids)){
log.warn(method+"移除id为空");
return R.fail(405,"移除id为空");
}
return basicdataForwardingUnitService.removeUnit(forwardingUnitDTO);
} catch (CustomerException e) {
log.error(e.message, e);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常", e);
return R.fail(500, method + "系统异常");
}
}
}

111
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataMainCategoryController.java

@ -0,0 +1,111 @@
package com.logpm.basicdata.controller;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.dto.MainDTO;
import com.logpm.basicdata.entity.BasicdataMainCategoryEntity;
import com.logpm.basicdata.service.IBasicdataMainCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Objects;
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/basicdataMainCategory")
@Api(value = "主体结算品类", tags = "主体结算品类")
public class BasicdataMainCategoryController {
private final IBasicdataMainCategoryService basicdataMainCategoryService;
@ResponseBody
@PostMapping("/pageList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "映射品类子类列表", notes = "传入mainDTO")
public R pageList(@RequestBody MainDTO mainDTO) {
String method = "############pageList: ";
log.info(method + "请求参数{}", mainDTO);
try {
IPage<BasicdataMainCategoryEntity> pages = basicdataMainCategoryService.pageList(mainDTO);
return R.data(pages);
} catch (CustomerException e) {
log.error(e.message, e);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常", e);
return R.fail(500, method + "系统异常");
}
}
@ResponseBody
@PostMapping("/editMainCategory")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增或更新映射品类子类", notes = "传入mainDTO")
public R editMainCategory(@RequestBody MainDTO mainDTO) {
String method = "############editMainCategory: ";
log.info(method + "请求参数{}", mainDTO);
try {
Long factoryCategoryId = mainDTO.getFactoryCategoryId();
if(Objects.isNull(factoryCategoryId)){
log.warn(method+"映射id为空");
return R.fail(405,"映射id为空");
}
Long mainId = mainDTO.getMainId();
if(Objects.isNull(mainId)){
log.warn(method+"主体id为空");
return R.fail(405,"主体id为空");
}
Long categoryId = mainDTO.getCategoryId();
if(Objects.isNull(categoryId)){
log.warn(method+"品类id为空");
return R.fail(405,"品类id为空");
}
return basicdataMainCategoryService.editMainCategory(mainDTO);
} catch (CustomerException e) {
log.error(e.message, e);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常", e);
return R.fail(500, method + "系统异常");
}
}
@ResponseBody
@PostMapping("/removeMainCategory")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "删除主体映射", notes = "传入mainDTO")
public R removeMainCategory(@RequestBody MainDTO mainDTO) {
String method = "############removeMainCategory: ";
log.info(method + "请求参数{}", mainDTO);
try {
List<Long> ids = mainDTO.getIds();
if(CollUtil.isEmpty(ids)){
log.warn(method+"移除id为空");
return R.fail(405,"移除id为空");
}
return basicdataMainCategoryService.removeMainCategory(mainDTO);
} catch (CustomerException e) {
log.error(e.message, e);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常", e);
return R.fail(500, method + "系统异常");
}
}
}

31
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataMainController.java

@ -2,22 +2,23 @@ package com.logpm.basicdata.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataGoodsAreaEntity;
import com.logpm.basicdata.dto.MainDTO;
import com.logpm.basicdata.entity.BasicdataMainEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.service.IBasicdataMainService;
import com.logpm.basicdata.vo.BasicdataGoodsAreaVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Objects;
import java.util.List;
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/basicdataMain")
@ -56,4 +57,26 @@ public class BasicdataMainController {
return R.data(pages);
}
@ResponseBody
@PostMapping("/mainList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "主体列表", notes = "传入mainDTO")
public R mainList(@RequestBody MainDTO mainDTO) {
String method = "############mainList: ";
log.info(method + "请求参数{}", mainDTO);
try {
List<BasicdataMainEntity> list = basicdataMainService.mainList(mainDTO);
return R.data(list);
} catch (CustomerException e) {
log.error(e.message, e);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常", e);
return R.fail(500, method + "系统异常");
}
}
}

27
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/ForwardingUnitDTO.java

@ -0,0 +1,27 @@
package com.logpm.basicdata.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class ForwardingUnitDTO implements Serializable {
private Integer pageNum;
private Integer pageSize;
private List<Long> warehouseIds;
private List<Long> ids;
private Long warehouseId;
private String warehouseName;
private Long clientId;
private String clientName;
}

23
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/MainDTO.java

@ -0,0 +1,23 @@
package com.logpm.basicdata.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class MainDTO implements Serializable {
private String mainName;
private Integer pageNum;
private Integer pageSize;
private Long factoryCategoryId;
private Long mainId;
private Long categoryId;
private String category;
private List<Long> ids;
}

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataForwardingUnitMapper.java

@ -1,11 +1,20 @@
package com.logpm.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.ForwardingUnitDTO;
import com.logpm.basicdata.entity.BasicdataForwardingUnitEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface BasicdataForwardingUnitMapper extends BaseMapper<BasicdataForwardingUnitEntity> {
IPage<BasicdataForwardingUnitEntity> pageList(IPage<Object> page, @Param("param") ForwardingUnitDTO forwardingUnitDTO);
BasicdataForwardingUnitEntity findByWarehouseId(@Param("warehouseId") Long warehouseId);
void removeUnit(@Param("ids") List<Long> ids);
}

34
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataForwardingUnitMapper.xml

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.basicdata.mapper.BasicdataForwardingUnitMapper">
<select id="pageList" resultType="com.logpm.basicdata.entity.BasicdataForwardingUnitEntity">
select *
from logpm_basicdata_forwarding_unit
<where>
and is_deleted = 0
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0">
and warehouse_id in
<foreach collection="param.warehouseIds" item="warehouseId" open="(" separator="," close=")">
#{warehouseId}
</foreach>
</if>
</where>
</select>
<select id="findByWarehouseId" resultType="com.logpm.basicdata.entity.BasicdataForwardingUnitEntity">
select *
from logpm_basicdata_forwarding_unit
where warehouse_id = #{warehouseId}
and is_deleted = 0
</select>
<delete id="removeUnit" >
delete from logpm_basicdata_forwarding_unit
where id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

16
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataMainCategoryMapper.java

@ -0,0 +1,16 @@
package com.logpm.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.MainDTO;
import com.logpm.basicdata.entity.BasicdataMainCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface BasicdataMainCategoryMapper extends BaseMapper<BasicdataMainCategoryEntity> {
IPage<BasicdataMainCategoryEntity> pageList(IPage<Object> page, @Param("param") MainDTO mainDTO);
BasicdataMainCategoryEntity findEntityByParam(@Param("param") MainDTO mainDTO);
}

24
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataMainCategoryMapper.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.basicdata.mapper.BasicdataMainCategoryMapper">
<select id="pageList" resultType="com.logpm.basicdata.entity.BasicdataMainCategoryEntity">
select *
from logpm_basicdata_main_category
<where>
and is_deleted = 0
<if test="param.factoryCategoryId != null ">
and factory_category_id = #{param.factoryCategoryId}
</if>
</where>
</select>
<select id="findEntityByParam" resultType="com.logpm.basicdata.entity.BasicdataMainCategoryEntity">
select *
from logpm_basicdata_main_category
where factory_category_id = #{param.factoryCategoryId}
and main_id = #{param.mainId}
and is_deleted = 0
</select>
</mapper>

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataMainMapper.java

@ -2,12 +2,16 @@ package com.logpm.basicdata.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.MainDTO;
import com.logpm.basicdata.entity.BasicdataMainEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface BasicdataMainMapper extends BaseMapper<BasicdataMainEntity> {
List<BasicdataMainEntity> selectBasicdataMainEntityPage(IPage<BasicdataMainEntity> page, BasicdataMainEntity basicdataMainEntity);
List<BasicdataMainEntity> mainList(@Param("param") MainDTO mainDTO);
}

12
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataMainMapper.xml

@ -6,4 +6,16 @@
<select id="selectBasicdataMainEntityPage" >
select * from logpm_basicdata_main where is_deleted = 0
</select>
<select id="mainList" resultType="com.logpm.basicdata.entity.BasicdataMainEntity">
select *
from logpm_basicdata_main
where is_deleted = 0
<if test="param.mainName != null and param.mainName != ''">
and name like concat('%', #{param.mainName}, '%')
</if>
limit 10
</select>
</mapper>

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataForwardingUnitService.java

@ -1,7 +1,16 @@
package com.logpm.basicdata.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.ForwardingUnitDTO;
import com.logpm.basicdata.entity.BasicdataForwardingUnitEntity;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
public interface IBasicdataForwardingUnitService extends BaseService<BasicdataForwardingUnitEntity> {
IPage<BasicdataForwardingUnitEntity> pageList(ForwardingUnitDTO forwardingUnitDTO);
R editUnit(ForwardingUnitDTO forwardingUnitDTO);
R removeUnit(ForwardingUnitDTO forwardingUnitDTO);
}

15
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataMainCategoryService.java

@ -0,0 +1,15 @@
package com.logpm.basicdata.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.MainDTO;
import com.logpm.basicdata.entity.BasicdataMainCategoryEntity;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
public interface IBasicdataMainCategoryService extends BaseService<BasicdataMainCategoryEntity> {
IPage<BasicdataMainCategoryEntity> pageList(MainDTO mainDTO);
R editMainCategory(MainDTO mainDTO);
R removeMainCategory(MainDTO mainDTO);
}

7
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataMainService.java

@ -1,13 +1,18 @@
package com.logpm.basicdata.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataHistoricalContractEntity;
import com.logpm.basicdata.dto.MainDTO;
import com.logpm.basicdata.entity.BasicdataMainEntity;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* 结算主体表 服务类
*/
public interface IBasicdataMainService extends BaseService<BasicdataMainEntity> {
IPage<BasicdataMainEntity> selectBasicdataMainEntityPage(IPage<BasicdataMainEntity> page, BasicdataMainEntity basicdataMainEntity);
List<BasicdataMainEntity> mainList(MainDTO mainDTO);
}

51
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataForwardingUnitServiceImpl.java

@ -1,16 +1,67 @@
package com.logpm.basicdata.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.dto.ForwardingUnitDTO;
import com.logpm.basicdata.entity.BasicdataForwardingUnitEntity;
import com.logpm.basicdata.mapper.BasicdataForwardingUnitMapper;
import com.logpm.basicdata.service.IBasicdataForwardingUnitService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
@Slf4j
@Service
@AllArgsConstructor
public class BasicdataForwardingUnitServiceImpl extends BaseServiceImpl<BasicdataForwardingUnitMapper, BasicdataForwardingUnitEntity> implements IBasicdataForwardingUnitService {
@Override
public IPage<BasicdataForwardingUnitEntity> pageList(ForwardingUnitDTO forwardingUnitDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(forwardingUnitDTO.getPageNum());
page.setSize(forwardingUnitDTO.getPageSize());
IPage<BasicdataForwardingUnitEntity> pageList = baseMapper.pageList(page,forwardingUnitDTO);
return pageList;
}
@Override
public R editUnit(ForwardingUnitDTO forwardingUnitDTO) {
Long warehouseId = forwardingUnitDTO.getWarehouseId();
BasicdataForwardingUnitEntity forwardingUnitEntity = baseMapper.findByWarehouseId(warehouseId);
if(Objects.isNull(forwardingUnitEntity)){
forwardingUnitEntity = new BasicdataForwardingUnitEntity();
}
forwardingUnitEntity.setWarehouseId(warehouseId);
forwardingUnitEntity.setWarehouseName(forwardingUnitDTO.getWarehouseName());
forwardingUnitEntity.setClientId(forwardingUnitDTO.getClientId());
forwardingUnitEntity.setClientName(forwardingUnitDTO.getClientName());
saveOrUpdate(forwardingUnitEntity);
return R.success("操作成功");
}
@Override
public R removeUnit(ForwardingUnitDTO forwardingUnitDTO) {
List<Long> ids = forwardingUnitDTO.getIds();
// baseMapper.removeUnit(ids);
deleteLogic(ids);
return R.success("操作成功");
}
}

58
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataMainCategoryServiceImpl.java

@ -0,0 +1,58 @@
package com.logpm.basicdata.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.dto.MainDTO;
import com.logpm.basicdata.entity.BasicdataMainCategoryEntity;
import com.logpm.basicdata.mapper.BasicdataMainCategoryMapper;
import com.logpm.basicdata.service.IBasicdataMainCategoryService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Service;
import java.util.Objects;
@Slf4j
@AllArgsConstructor
@Service
public class BasicdataMainCategoryServiceImpl extends BaseServiceImpl<BasicdataMainCategoryMapper,BasicdataMainCategoryEntity> implements IBasicdataMainCategoryService {
@Override
public IPage<BasicdataMainCategoryEntity> pageList(MainDTO mainDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(mainDTO.getPageNum());
page.setSize(mainDTO.getPageSize());
IPage<BasicdataMainCategoryEntity> pageList = baseMapper.pageList(page,mainDTO);
return pageList;
}
@Override
public R editMainCategory(MainDTO mainDTO) {
BasicdataMainCategoryEntity mainCategoryEntity = baseMapper.findEntityByParam(mainDTO);
if(Objects.isNull(mainCategoryEntity)){
mainCategoryEntity = new BasicdataMainCategoryEntity();
mainCategoryEntity.setFactoryCategoryId(mainDTO.getFactoryCategoryId());
mainCategoryEntity.setMainId(mainDTO.getMainId());
mainCategoryEntity.setMainName(mainDTO.getMainName());
}
mainCategoryEntity.setCategory(mainDTO.getCategory());
mainCategoryEntity.setCategoryId(mainDTO.getCategoryId());
saveOrUpdate(mainCategoryEntity);
return R.success("操作成功");
}
@Override
public R removeMainCategory(MainDTO mainDTO) {
deleteLogic(mainDTO.getIds());
return R.success("操作成功");
}
}

10
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataMainServiceImpl.java

@ -1,12 +1,17 @@
package com.logpm.basicdata.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.MainDTO;
import com.logpm.basicdata.entity.BasicdataForwardingUnitEntity;
import com.logpm.basicdata.entity.BasicdataMainEntity;
import com.logpm.basicdata.mapper.BasicdataMainMapper;
import com.logpm.basicdata.service.IBasicdataMainService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
@Service
public class BasicdataMainServiceImpl extends BaseServiceImpl<BasicdataMainMapper, BasicdataMainEntity> implements IBasicdataMainService {
@Override
@ -15,4 +20,9 @@ public class BasicdataMainServiceImpl extends BaseServiceImpl<BasicdataMainMappe
return page.setRecords(baseMapper.selectBasicdataMainEntityPage(page, basicdataMainEntity));
}
@Override
public List<BasicdataMainEntity> mainList(MainDTO mainDTO) {
return baseMapper.mainList(mainDTO);
}
}

13
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml

@ -69,6 +69,12 @@
<if test="param.waybillNo != null and param.waybillNo != '' ">
and Locate(#{param.waybillNo},lww.waybill_no) > 0
</if>
<if test="param.waybillNos != null and param.waybillNos.size() > 0 ">
and lww.waybill_no in
<foreach collection="param.waybillNos" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.orderCode != null and param.orderCode != '' ">
and Locate(#{param.orderCode},lww.order_no) > 0
</if>
@ -718,6 +724,13 @@
<if test="param.waybillNo != null and param.waybillNo != '' ">
and Locate(#{param.waybillNo},lww.waybill_no) > 0
</if>
<if test="param.waybillNos != null and param.waybillNos.size() > 0 ">
and lww.waybill_no in
<foreach collection="param.waybillNos" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.orderCode != null and param.orderCode != '' ">
and Locate(#{param.orderCode},lww.order_no) > 0
</if>

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/config/ExecutorConfig.java

@ -57,7 +57,6 @@ public class ExecutorConfig {
RequestAttributes context = RequestContextHolder.currentRequestAttributes();
String tenantId = AuthUtil.getTenantId();
Map<String, Object> all = ThreadLocalUtil.getAll();
Map<String, String> mdcMap = MDC.getCopyOfContextMap();
return () -> {

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml

@ -516,6 +516,7 @@
IFNULL(lbfc1.category,'其他') incomeCategoryName
from logpm_trunkline_advance_detail ltad
left join logpm_basicdata_factory_category lbfc1 on lbfc1.brand = ltad.brand and IFNULL(lbfc1.firsts,1) = IFNULL(ltad.first_pack_name,1) and IFNULL(lbfc1.seconds,2) = IFNULL(ltad.second_pack_name,2) and IFNULL(lbfc1.thirds,3) = IFNULL(ltad.third_pack_name,3) and lbfc1.type = 1 AND IFNULL(lbfc1.materiel_name,4) = IFNULL(ltad.material_name,4) AND lbfc1.is_deleted = 0
left join logpm_basicdata_main_category lbmc on lbmc.factory_category_id = lbfc1.id and lbmc.main_id = #{param.mainId} and lbmc.is_deleted = 0
where ltad.is_deleted = 0
<if test="param.advanceIds != null and param.advanceIds.size() > 0">
and ltad.advance_id in

29
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -815,6 +815,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Long waybillId = warehouseWaybillClient.addEnntity(waybillEntity);
waybillEntity.setId(waybillId);
try{
List<WarehouseWayBillDetail> details = new ArrayList<>();
if (!Objects.isNull(waybillId)) {
log.info("#################openWaybill: 运单保存成功");
@ -1058,6 +1059,11 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceIds.forEach(advanceId ->{
bladeRedis.del(openAdvanceIds+advanceId);
});
}catch (Exception e){
log.error("#####openWaybill:开单失败",e);
warehouseWaybillClient.deleteAllByWaybillId(waybillId);
throw new CustomerException(405,"开单失败");
}
return R.data(waybillId);
}
@ -1221,6 +1227,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Long waybillId = warehouseWaybillClient.addEnntity(waybillEntity);
waybillEntity.setId(waybillId);
try{
List<WarehouseWayBillDetail> details = new ArrayList<>();
if (!Objects.isNull(waybillId)) {
log.info("#################openZeroWaybill: 运单保存成功");
@ -1338,7 +1347,11 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//发送零担开单广播
sendOpenZeroWaybillFanout(AuthUtil.getUserId(), AuthUtil.getNickName(), warehouseId, warehouseName, waybillEntity, details);
}catch (Exception e){
log.error("#####openWaybill:开单失败",e);
warehouseWaybillClient.deleteAllByWaybillId(waybillId);
throw new CustomerException(405,"开单失败");
}
Map<String, Object> map = new HashMap<>();
map.put("waybillId", waybillId);
@ -4632,7 +4645,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
//TODO 还需要加上生成了预存单的无法进行作废
//生成了预存单的无法进行作废
Integer status = orderInfoClient.findCreateRencilitionOrderStatus(waybillId);
if (status == 1) {
log.warn("##########abolishWaybill: 运单已有预存单确认 waybillId={}", waybillId);
@ -4802,6 +4815,14 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
public R findAdvanceDetailListByAdvanceIds(AdvanceDTO advanceDTO) {
List<Long> advanceIds = advanceDTO.getAdvanceIds();
Long clientId = advanceDTO.getClientId();
if(!Objects.isNull(clientId)){
BasicdataClientEntity clientEntity = basicdataClientClient.findEntityById(clientId);
if(!Objects.isNull(clientEntity)){
advanceDTO.setMainId(clientEntity.getMainId());
}
}
List<AdvanceDetailVO> advanceDetailVOList = advanceDetailService.findAdvanceDetailListByAdvanceIds(advanceDTO);
return R.data(advanceDetailVOList);
@ -5596,9 +5617,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Long newDestinationWarehouseId = openOrderDTO.getDestinationWarehouseId();
String newDestinationWarehouseName = openOrderDTO.getDestinationWarehouseName();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
String departureWarehouseName = waybillEntity.getDepartureWarehouseName();
String destinationWarehouseName = waybillEntity.getDestinationWarehouseName();
if (!ObjectUtil.equals(destinationWarehouseId, newDestinationWarehouseId)) {
stringBuilder.append("目的仓:").append(departureWarehouseName).append("-->").append(newDestinationWarehouseName).append(";");
stringBuilder.append("目的仓:").append(destinationWarehouseName).append("-->").append(newDestinationWarehouseName).append(";");
waybillEntity.setDestinationWarehouseId(newDestinationWarehouseId);
waybillEntity.setDestinationWarehouseName(newDestinationWarehouseName);
//查询所有该运单的包件

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillClient.java

@ -139,4 +139,9 @@ public class WarehouseWaybillClient implements IWarehouseWaybillClient {
public List<WarehouseWaybillEntity> findWaybillVOByOrderCode(String orderCode) {
return warehouseWaybillService.findWaybillVOByOrderCode(orderCode);
}
@Override
public void deleteAllByWaybillId(Long waybillId) {
warehouseWaybillService.deleteAllByWaybillId(waybillId);
}
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java

@ -98,4 +98,5 @@ public interface IWarehouseWaybillService extends BaseService<WarehouseWaybillEn
R updateWaybillTypeService(WarehouseWaybillDTO waybillDTO);
void deleteAllByWaybillId(Long waybillId);
}

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -1261,4 +1261,15 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
return R.success("修改成功");
}
@Override
public void deleteAllByWaybillId(Long waybillId) {
List<Long> waybillIds = Arrays.asList(waybillId);
baseMapper.deleteByWaybillIds(waybillIds);
warehouseWayBillDetailService.deleteByWaybillIds(waybillIds);
}
}

Loading…
Cancel
Save