Browse Source

修改物料

training
caoyizhong 1 year ago
parent
commit
47de60d250
  1. 4
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java
  2. 8
      blade-service/logpm-basic/src/main/java/com/logpm/basic/excel/BasicMaterialExcel.java
  3. 1
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java

4
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java

@ -85,7 +85,9 @@ public class BasicMaterialController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入basicMaterial")
public R<IPage<BasicMaterialEntity>> list(@ApiIgnore @RequestParam Map<String, Object> basicMaterial, Query query) {
IPage<BasicMaterialEntity> pages = basicMaterialService.page(Condition.getPage(query), Condition.getQueryWrapper(basicMaterial, BasicMaterialEntity.class));
QueryWrapper<BasicMaterialEntity> queryWrapper = Condition.getQueryWrapper(basicMaterial, BasicMaterialEntity.class);
queryWrapper.orderByDesc("create_time");
IPage<BasicMaterialEntity> pages = basicMaterialService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}

8
blade-service/logpm-basic/src/main/java/com/logpm/basic/excel/BasicMaterialExcel.java

@ -136,25 +136,25 @@ public class BasicMaterialExcel implements Serializable {
*/
@ColumnWidth(20)
@ExcelProperty("长")
private BigDecimal extent;
private String extent;
/**
*
*/
@ColumnWidth(20)
@ExcelProperty("宽")
private BigDecimal breadth;
private String breadth;
/**
* 高度
*/
@ColumnWidth(20)
@ExcelProperty("高度")
private BigDecimal altitude;
private String altitude;
/**
* 体积
*/
@ColumnWidth(20)
@ExcelProperty("体积")
private BigDecimal volume;
private String volume;
/**
* 总量
*/

1
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java

@ -94,6 +94,7 @@ public class BasicMaterialServiceImpl extends BaseServiceImpl<BasicMaterialMappe
List<BasicMaterialEntity> basicMaterialEntities = baseMapper.selectList(new QueryWrapper<BasicMaterialEntity>().lambda().eq(BasicMaterialEntity::getProductCode,datum.getProductCode()));
if (basicMaterialEntities.size()>0){continue;}
BasicMaterialEntity copy = BeanUtil.copy(datum, BasicMaterialEntity.class);
copy.setHide(1);
arrayList.add(copy);
}
// 根据对象的value属性进行去重

Loading…
Cancel
Save