Browse Source

fix:1.修改开单获取包件的结算品类

dist.1.3.0
pref_mail@163.com 8 months ago
parent
commit
39c6a17fcf
  1. 5
      blade-biz-common/src/main/java/org/springblade/common/exception/CustomerException.java
  2. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  3. 12
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java

5
blade-biz-common/src/main/java/org/springblade/common/exception/CustomerException.java

@ -1,5 +1,8 @@
package org.springblade.common.exception;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
*
*类说明 自定义异常
@ -7,6 +10,8 @@ package org.springblade.common.exception;
* @author zhy
* @date 2023年6月1日
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class CustomerException extends RuntimeException {
/**
*

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

@ -51,7 +51,8 @@
sum(ltad.weight) weight,
sum(ltad.volume) volume
from logpm_trunkline_advance_detail ltad
left join logpm_basicdata_factory_category lbfc on lbfc.brand = ltad.brand and lbfc.firsts = ltad.first_pack_name and lbfc.seconds = ltad.second_pack_name and lbfc.thirds = ltad.third_pack_name
left join logpm_basicdata_factory_category lbfc on lbfc.brand = ltad.brand and type=1
and lbfc.firsts = ltad.first_pack_name and lbfc.seconds = ltad.second_pack_name and lbfc.thirds = ltad.third_pack_name and lbfc.materiel_name=ltad.material_name
left join logpm_basicdata_category lbc on lbc.id = lbfc.category_id
where ltad.is_deleted = 0
and ltad.advance_id in

12
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java

@ -34,6 +34,8 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
@ -62,6 +64,7 @@ import java.util.stream.Collectors;
* @since 2023-07-10
*/
@RestController
@Slf4j
@AllArgsConstructor
@RequestMapping("/warehouseWarehousingEntry")
@Api(value = "仓库入库单", tags = "仓库入库单接口")
@ -181,8 +184,13 @@ public class WarehouseWarehousingEntryController extends BladeController {
@ApiOperation(value = "导入入库数据", notes = "传入excel")
public R importWarehousingEntry(MultipartFile file, Integer isCovered) {
isCovered = 1;
WarehouseEntryImporter userImporter = new WarehouseEntryImporter(warehouseWarehousingEntryService, isCovered == 1);
ExcelUtil.save(file, userImporter, WarehousingEntryDetailExcel.class);
try {
WarehouseEntryImporter userImporter = new WarehouseEntryImporter(warehouseWarehousingEntryService, isCovered == 1);
ExcelUtil.save(file, userImporter, WarehousingEntryDetailExcel.class);
}catch (CustomerException e){
log.error("导入失败",e);
return R.fail(e.getMessage());
}
return R.success("操作成功");
}

Loading…
Cancel
Save