Browse Source

修改提货查询

dev-warehouse
caoyizhong 2 years ago
parent
commit
f3da51a4db
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistrilbutionBillLadingEntity.java
  2. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingVO.java
  3. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockListController.java
  4. 43
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java
  5. 68
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java
  6. 27
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/StockListImporter.java
  7. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  8. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  9. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  10. 41
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  11. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  12. 2890
      doc/dpm/物流租户系统.pdma.json

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistrilbutionBillLadingEntity.java

@ -96,7 +96,7 @@ public class DistrilbutionBillLadingEntity extends TenantEntity {
* 证件类型
*/
@ApiModelProperty(value = "证件类型")
private Integer certificateType;
private String certificateType;
/**
* 费用合计
*/

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingVO.java

@ -46,6 +46,9 @@ public class DistrilbutionBillLadingVO extends DistrilbutionBillLadingEntity {
private String totalNumber;
private String brand;
private String typeService;
private String condition; //提货状态
private String conditionName; //提货状态
private String typeServiceName;
private String transport; //搬运
private String forklift; //叉车

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockListController.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.controller;
import com.logpm.distribution.excel.StockListImporter;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -40,6 +41,7 @@ import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
@ -157,6 +159,18 @@ public class DistributionStockListController extends BladeController {
ExcelUtil.export(response, "库存品管理数据" + DateUtil.time(), "库存品管理数据表", list, DistributionStockListExcel.class);
}
/**
* 导入用户
*/
@PostMapping("import-StockList")
@ApiOperationSupport(order = 12)
@ApiOperation(value = "导入用户", notes = "传入excel")
public R importStockList(MultipartFile file, Integer isCovered) {
StockListImporter userImporter = new StockListImporter(distributionStockListService, isCovered == 1);
ExcelUtil.save(file, userImporter, DistributionStockListExcel.class);
return R.success("操作成功");
}
/**
* 获取批量在库订单信息
*/

43
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java

@ -29,6 +29,8 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.entity.DictBiz;
import org.springblade.system.feign.IDictBizClient;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -43,6 +45,7 @@ import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import java.util.Objects;
import javax.servlet.http.HttpServletResponse;
/**
@ -59,6 +62,8 @@ public class DistrilbutionBillLadingController extends BladeController {
private final IDistrilbutionBillLadingService distrilbutionBillLadingService;
private final IDictBizClient dictBizClient;
/**
* 提货单 详情
*/
@ -89,6 +94,44 @@ public class DistrilbutionBillLadingController extends BladeController {
@ApiOperation(value = "分页", notes = "传入distrilbutionBillLading")
public R<IPage<DistrilbutionBillLadingVO>> listOwn(@ApiIgnore @RequestParam Map<String, Object> distrilbutionBillLading, Query query) {
IPage<DistrilbutionBillLadingVO> pages = distrilbutionBillLadingService.pageList(Condition.getPage(query), distrilbutionBillLading);
List<DistrilbutionBillLadingVO> records = pages.getRecords();
records.forEach( i ->{
String typeService = i.getTypeService();
R<List<DictBiz>> distribution_type = dictBizClient.getList("distribution_type");
if(!Objects.isNull(i.getTypeService())){
if(Func.isNotEmpty(typeService)){
DictBiz dictBiz = distribution_type.getData().get(Integer.parseInt(typeService) -1);
i.setTypeServiceName(dictBiz.getDictValue());
switch (Integer.parseInt(i.getCondition())){
case 1:
i.setConditionName("未通知");
break;
case 2:
i.setConditionName("已通知");
break;
case 3:
i.setConditionName("待备货");
break;
case 4:
i.setConditionName("备货中");
break;
case 5:
i.setConditionName("备货完成");
break;
case 6:
i.setConditionName("已提货");
break;
case 7:
i.setConditionName("已完成");
break;
default:
i.setConditionName("无");
break;
}
}
}
} );
return R.data(pages);
}

68
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java

@ -16,10 +16,12 @@
*/
package com.logpm.distribution.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
@ -37,6 +39,71 @@ public class DistrilbutionBillLadingDTO extends DistrilbutionBillLadingEntity {
*
*/
private String name;
/**
* 提货批次
*/
private String pickupBatch;
/**
* 服务号
*/
private String serviceNumber;
/**
* 运单号
*/
private String waybillNumber;
/**
* 收货单位
*/
private String consigneeUnit;
/**
* 收货人
*/
private String customerName;
/**
* 联系电话
*/
private String customerTelephone;
/**
* 仓库
*/
private String warehouse;
/**
* 入库时间
*/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date warehouseEntryTime;
/**
* 品牌
*/
private String brand;
/**
* 服务类型
*/
private String typeService;
/**
* 货品信息
*/
private String productInformation;
/**
* 提货手机
*/
private String pickupPhone;
/**
* 提货人
*/
private String consignee;
/**
* 提货车牌
*/
private String pickUpPlate;
/**
* 提货证件
*/
private String deliveryDocument;
/**
* 证件类型
*/
private String certificateType;
/**
* 订单Id
*/
@ -50,7 +117,6 @@ public class DistrilbutionBillLadingDTO extends DistrilbutionBillLadingEntity {
@Data
public class print{
private String state;
private String name;
private String url;

27
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/StockListImporter.java

@ -0,0 +1,27 @@
package com.logpm.distribution.excel;
import com.logpm.distribution.service.IDistributionStockListService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springblade.core.excel.support.ExcelImporter;
import java.util.List;
/**
* @program: LogisticsPlatform-Service
* @description:
* @author: cyz
* @create: 2023-07-06 10:57
**/
@RequiredArgsConstructor
public class StockListImporter implements ExcelImporter<DistributionStockListExcel> {
private final IDistributionStockListService service;
private final Boolean isCovered;
@Override
public void save(List<DistributionStockListExcel> data) {
service.importUser(data, isCovered);
}
}

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.mapper;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.vo.DistrilbutionBillLadingVO;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
@ -51,5 +52,5 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
*/
List<DistrilbutionBillLadingExcel> exportDistrilbutionBillLading(@Param("ew") Wrapper<DistrilbutionBillLadingEntity> queryWrapper);
IPage<DistrilbutionBillLadingVO> pageList(IPage<Object> page, DistrilbutionBillLadingEntity distrilbutionBillLadingEntity);
IPage<DistrilbutionBillLadingVO> pageList(IPage<Object> page, @Param("param") DistrilbutionBillLadingDTO distrilbutionBillLadingDTO);
}

25
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -29,10 +29,29 @@
select dbl.id,dsa.service_number serviceNumber,dsa.waybill_number waybillNumber,dsa.consignee_unit consigneeUnit,dsa.customer_name customerName,dsa.customer_telephone
customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee storageFee,dsa.total_number totalNumber,
dsa.brand,dsa.type_service typeService,dbl.pick_up_time,dbl.consignee,dbl.delivery_document
dsa.brand,dsa.type_service typeService,dbl.pick_up_time,dbl.consignee,dbl.delivery_document,dbl.condition
from logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock_article dsa on dbl.stock_article_id = dsa.id
where dbl.is_deleted = 0
LEFT JOIN logpm_distribution_stock_article dsa on dbl.stock_article_id = dsa.id
<where>
dbl.is_deleted = 0
<if test="param.serviceNumber != null and param.serviceNumber != ''"> and dsa.service_number like concat('%',#{param.serviceNumber},'%')</if>
<if test="param.pickupBatch != null and param.pickupBatch != ''"> and dbl.pickup_batch like concat('%',#{param.pickupBatch},'%')</if>
<if test="param.waybillNumber != null and param.waybillNumber != ''">and dsa.waybill_number like concat('%',#{param.waybillNumber},'%')</if>
<if test="param.consigneeUnit != null and param.consigneeUnit != ''">and dsa.consignee_unit like concat('%',#{param.consigneeUnit},'%')</if>
<if test="param.customerName != null and param.customerName != ''">and dsa.customer_name like concat('%',#{param.customerName},'%')</if>
<if test="param.customerTelephone != null and param.customerTelephone != ''">and dsa.customer_telephone like concat('%',#{param.customerTelephone},'%')</if>
<if test="param.warehouse != null and param.warehouse != ''">and dsa.warehouse like concat('%',#{param.warehouse},'%')</if>
<if test="param.warehouseEntryTime != null ">and date(dsa.warehouse_entry_time) = #{param.warehouseEntryTime}</if>
<if test="param.brand != null and param.brand != ''">and dsa.brand like concat('%',#{param.brand},'%')</if>
<if test="param.typeService != null and param.typeService != ''">and dsa.type_service = #{param.typeService},=</if>
<if test="param.productInformation != null and param.productInformation != ''">and dsa.product_information like concat('%',#{param.productInformation},'%')</if>
<if test="param.pickupPhone != null and param.pickupPhone != ''">and dbl.pickup_phone concat('%',#{param.pickupPhone},'%')</if>
<if test="param.consignee != null and param.consignee != ''">and dbl.consignee like concat('%',#{param.consignee},'%')</if>
<if test="param.pickUpPlate != null and param.pickUpPlate != ''">and dbl.pick_up_late like concat('%',#{param.pickUpPlate},'%')</if>
<if test="param.deliveryDocument != null and param.deliveryDocument != ''">and dbl.delivery_document like concat('%',#{param.deliveryDocument},'%')</if>
<if test="param.certificateType != null and param.certificateType != ''">and dbl.certificate_type = #{param.certificateType},</if>
</where>
</select>
<select id="selectDistrilbutionBillLadingPage" resultMap="distrilbutionBillLadingResultMap">

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java

@ -59,5 +59,14 @@ public interface IDistributionStockListService extends BaseService<DistributionS
*/
R<List<DistributionStockArticleVO>> getPackageList(String id);
/**
* 导入用户数据
*
* @param data
* @param isCovered
* @return
*/
void importUser(List<DistributionStockListExcel> data, Boolean isCovered);
Boolean parcels(DistributionStockListEntity distributionStockList);
}

41
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -28,8 +28,9 @@ import com.logpm.distribution.mapper.DistributionStockListMapper;
import lombok.AllArgsConstructor;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.RandomType;
import org.springblade.core.tool.utils.*;
import org.springblade.system.cache.DictCache;
import org.springblade.system.enums.DictEnum;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -38,6 +39,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* 库存品管理 服务实现类
@ -76,6 +79,40 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
return null;
}
@Override
public void importUser(List<DistributionStockListExcel> data, Boolean isCovered) {
data.forEach(userExcel -> {
DistributionStockListEntity distributionStockListEntity = Objects.requireNonNull(BeanUtil.copy(userExcel, DistributionStockListEntity.class));
/* // 设置用户平台
user.setUserType(Func.toInt(DictCache.getKey(DictEnum.USER_TYPE, userExcel.getUserTypeName()), 1));
// 设置部门ID
user.setDeptId(Func.toStrWithEmpty(SysCache.getDeptIds(userExcel.getTenantId(), userExcel.getDeptName()), StringPool.EMPTY));
// 设置岗位ID
user.setPostId(Func.toStrWithEmpty(SysCache.getPostIds(userExcel.getTenantId(), userExcel.getPostName()), StringPool.EMPTY));
// 设置角色ID
user.setRoleId(Func.toStrWithEmpty(SysCache.getRoleIds(userExcel.getTenantId(), userExcel.getRoleName()), StringPool.EMPTY));
// 设置租户ID
if (!AuthUtil.isAdministrator() || StringUtil.isBlank(user.getTenantId())) {
user.setTenantId(AuthUtil.getTenantId());
}
// 覆盖数据
if (isCovered) {
// 查询用户是否存在
User oldUser = UserCache.getUser(userExcel.getTenantId(), userExcel.getAccount());
if (oldUser != null && oldUser.getId() != null) {
user.setId(oldUser.getId());
this.updateUser(user);
return;
}
}
// 获取默认密码配置
String initPassword = ParamCache.getValue(DEFAULT_PARAM_PASSWORD);
user.setPassword(initPassword);
this.submit(user);*/
});
}
/**
*
* @param distributionStockList

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -179,8 +179,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
@Override
public IPage<DistrilbutionBillLadingVO> pageList(IPage<Object> page, Map<String, Object> distrilbutionBillLading) {
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingEntity.class);
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingEntity);
DistrilbutionBillLadingDTO distrilbutionBillLadingDTO = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingDTO.class);
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingDTO);
List<DistrilbutionBillLadingVO> records =distrilbutionBillLadingVOIPage.getRecords();
records.forEach( i -> {

2890
doc/dpm/物流租户系统.pdma.json

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save