1.添加删除码接口

2.修复一级包装且最小销售包装数量为0时计算数量错误问题
3.打印模板添加单据类型字段,绑定单据类型
master
x_z 3 years ago
parent 1d3c7c4d2b
commit 2b3021f137

@ -1,5 +1,6 @@
package com.glxp.udi.admin.controller.inout; package com.glxp.udi.admin.controller.inout;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -117,7 +118,7 @@ public class WareHouseController {
*/ */
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/warehouse/inout/warehouseUserList") @GetMapping("/warehouse/inout/warehouseUserList")
public BaseResponse getWarehouseUserList(@Valid FilterInvLinkDataRequest filterInvLinkDataRequest) { public BaseResponse getWarehouseUserList(FilterInvLinkDataRequest filterInvLinkDataRequest) {
Page<WarehouseUserEntity> page = warehouseUserService.filterUserList(filterInvLinkDataRequest); Page<WarehouseUserEntity> page = warehouseUserService.filterUserList(filterInvLinkDataRequest);
PageSimpleResponse<WarehouseUserEntity> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<WarehouseUserEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(page.getTotal()); pageSimpleResponse.setTotal(page.getTotal());
@ -261,4 +262,24 @@ public class WareHouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
/**
* @param deleteCodeRequest
* @param bindingResult
* @return
*/
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/code/deleteCodes")
public BaseResponse deleteCodes(@RequestBody DeleteCodeRequest deleteCodeRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<Long> ids = deleteCodeRequest.getCodes();
if (CollUtil.isNotEmpty(ids)) {
warehouseTempService.deleteCodes(ids);
} else {
return ResultVOUtils.error(ResultEnum.DATA_ERROR);
}
return ResultVOUtils.success("删除成功");
}
} }

@ -1,6 +1,7 @@
package com.glxp.udi.admin.controller.param; package com.glxp.udi.admin.controller.param;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
@ -10,6 +11,7 @@ import com.glxp.udi.admin.req.param.SystemPDFTemplateRequest;
import com.glxp.udi.admin.req.param.SystemPDFTemplateSaveRequest; import com.glxp.udi.admin.req.param.SystemPDFTemplateSaveRequest;
import com.glxp.udi.admin.res.PageSimpleResponse; import com.glxp.udi.admin.res.PageSimpleResponse;
import com.glxp.udi.admin.res.param.SystemPDFTemplateResponse; import com.glxp.udi.admin.res.param.SystemPDFTemplateResponse;
import com.glxp.udi.admin.service.basic.BussinessTypeService;
import com.glxp.udi.admin.service.param.SystemPDFTemplateService; import com.glxp.udi.admin.service.param.SystemPDFTemplateService;
import com.glxp.udi.admin.util.JasperUtils; import com.glxp.udi.admin.util.JasperUtils;
import com.glxp.udi.admin.util.PageUtil; import com.glxp.udi.admin.util.PageUtil;
@ -37,6 +39,8 @@ public class SystemPDFTemplateController {
@Resource @Resource
private SystemPDFTemplateService systemPDFTemplateService; private SystemPDFTemplateService systemPDFTemplateService;
@Resource
private BussinessTypeService bussinessTypeService;
@AuthRuleAnnotation("system/pdf/template/list") @AuthRuleAnnotation("system/pdf/template/list")
@GetMapping("/system/pdf/template/list") @GetMapping("/system/pdf/template/list")
@ -49,6 +53,9 @@ public class SystemPDFTemplateController {
List<SystemPDFTemplateResponse> systemPDFTemplateResponseList = page.getRecords().stream().map(item -> { List<SystemPDFTemplateResponse> systemPDFTemplateResponseList = page.getRecords().stream().map(item -> {
SystemPDFTemplateResponse systemPDFTemplateResponse = new SystemPDFTemplateResponse(); SystemPDFTemplateResponse systemPDFTemplateResponse = new SystemPDFTemplateResponse();
BeanUtils.copyProperties(item, systemPDFTemplateResponse); BeanUtils.copyProperties(item, systemPDFTemplateResponse);
if (StrUtil.isNotBlank(item.getAction())) {
systemPDFTemplateResponse.setBussinessTypeName(bussinessTypeService.findNameByAction(item.getAction()));
}
return systemPDFTemplateResponse; return systemPDFTemplateResponse;
}).collect(Collectors.toList()); }).collect(Collectors.toList());

@ -1,5 +1,7 @@
package com.glxp.udi.admin.entity.info; package com.glxp.udi.admin.entity.info;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -7,6 +9,7 @@ import lombok.Data;
@TableName("device_check") @TableName("device_check")
public class DeviceKeyEntity { public class DeviceKeyEntity {
@TableId(type = IdType.AUTO)
private String id; private String id;
private String imei; private String imei;

@ -114,4 +114,11 @@ public class UdiInfoEntity {
@TableField(exist = false) @TableField(exist = false)
private Boolean isCheck; private Boolean isCheck;
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
return 1;
} else
return bhzxxsbzsl;
}
} }

@ -41,4 +41,9 @@ public class SystemPDFTemplateEntity {
*/ */
private String customerId; private String customerId;
/**
*
*/
private String action;
} }

@ -0,0 +1,11 @@
package com.glxp.udi.admin.req.inout;
import lombok.Data;
import java.util.List;
@Data
public class DeleteCodeRequest {
List<Long> codes;
}

@ -3,8 +3,6 @@ package com.glxp.udi.admin.req.inventory;
import com.glxp.udi.admin.req.ListPageRequest; import com.glxp.udi.admin.req.ListPageRequest;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
/** /**
* *
*/ */
@ -12,7 +10,6 @@ import javax.validation.constraints.NotBlank;
public class FilterInvLinkDataRequest extends ListPageRequest { public class FilterInvLinkDataRequest extends ListPageRequest {
//分仓码 //分仓码
@NotBlank(message = "仓库码不能为空")
private String code; private String code;
} }

@ -24,4 +24,9 @@ public class SystemPDFTemplateSaveRequest {
* ID * ID
*/ */
private String customerId; private String customerId;
/**
*
*/
private String action;
} }

@ -26,4 +26,9 @@ public class SystemPDFTemplateResponse {
* ID * ID
*/ */
private String customerId; private String customerId;
/**
*
*/
private String bussinessTypeName;
} }

@ -220,4 +220,17 @@ public class BussinessTypeService {
} }
return unitType; return unitType;
} }
/**
*
*
* @param action
* @return
*/
public String findNameByAction(String action) {
if (StrUtil.isBlank(action)) {
return null;
}
return bussinessTypeDao.selectNameByAction(action);
}
} }

@ -10,11 +10,13 @@ import com.glxp.udi.admin.entity.inout.WarehousetempEntity;
import com.glxp.udi.admin.req.inout.DeleteRequest; import com.glxp.udi.admin.req.inout.DeleteRequest;
import com.glxp.udi.admin.req.inout.WarehouseQueryRequest; import com.glxp.udi.admin.req.inout.WarehouseQueryRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
@Service @Service
@Transactional
public class WarehouseTempService { public class WarehouseTempService {
@Resource @Resource
@ -29,13 +31,14 @@ public class WarehouseTempService {
/** /**
* *
*
* @param warehouseQueryRequest * @param warehouseQueryRequest
* @return * @return
*/ */
private QueryWrapper<WarehousetempEntity> buildCodesTempQueryWrapper(WarehouseQueryRequest warehouseQueryRequest) { private QueryWrapper<WarehousetempEntity> buildCodesTempQueryWrapper(WarehouseQueryRequest warehouseQueryRequest) {
QueryWrapper<WarehousetempEntity> wrapper = new QueryWrapper<>(); QueryWrapper<WarehousetempEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StrUtil.isNotBlank(warehouseQueryRequest.getCode()), "code", warehouseQueryRequest.getCode()) wrapper.eq(StrUtil.isNotBlank(warehouseQueryRequest.getCode()), "code", warehouseQueryRequest.getCode())
.eq(StrUtil.isNotBlank(warehouseQueryRequest.getOrderId()),"orderId",warehouseQueryRequest.getOrderId()) .eq(StrUtil.isNotBlank(warehouseQueryRequest.getOrderId()), "orderId", warehouseQueryRequest.getOrderId())
.eq(StrUtil.isNotBlank(warehouseQueryRequest.getCorpOrderId()), "corpOrderId", warehouseQueryRequest.getCorpOrderId()) .eq(StrUtil.isNotBlank(warehouseQueryRequest.getCorpOrderId()), "corpOrderId", warehouseQueryRequest.getCorpOrderId())
.eq(null != warehouseQueryRequest.getCustomerId(), "customerId", warehouseQueryRequest.getCustomerId()); .eq(null != warehouseQueryRequest.getCustomerId(), "customerId", warehouseQueryRequest.getCustomerId());
return wrapper; return wrapper;
@ -71,4 +74,12 @@ public class WarehouseTempService {
codesTempDao.updateCount(warehousetemp.getId(), warehousetemp.getCount()); codesTempDao.updateCount(warehousetemp.getId(), warehousetemp.getCount());
} }
/**
*
*
* @param ids
*/
public void deleteCodes(List<Long> ids) {
codesTempDao.deleteBatchIds(ids);
}
} }

@ -2,6 +2,7 @@ package com.glxp.udi.admin.util.inout;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.glxp.udi.admin.constant.Constant; import com.glxp.udi.admin.constant.Constant;
import com.glxp.udi.admin.constant.TypeConstant; import com.glxp.udi.admin.constant.TypeConstant;
import com.glxp.udi.admin.entity.info.SetupEntity; import com.glxp.udi.admin.entity.info.SetupEntity;
@ -208,6 +209,14 @@ public class InoutUtils {
return null; return null;
} }
/**
*
*
* @param udiInfoService
* @param udiRelevanceService
* @param orderDetailService
* @param warehouseEntityList
*/
public void generateConstrastDetail(UdiInfoService udiInfoService, UdiRelevanceService udiRelevanceService, public void generateConstrastDetail(UdiInfoService udiInfoService, UdiRelevanceService udiRelevanceService,
OrderDetailService orderDetailService, OrderDetailService orderDetailService,
List<WarehouseEntity> warehouseEntityList) { List<WarehouseEntity> warehouseEntityList) {
@ -254,7 +263,7 @@ public class InoutUtils {
orderDetailEntity.setGgxh(erpDetailCodeEntity.getGgxh()); orderDetailEntity.setGgxh(erpDetailCodeEntity.getGgxh());
erpOrderEntities.add(orderDetailEntity); erpOrderEntities.add(orderDetailEntity);
} }
if (!erpOrderEntities.isEmpty()) { if (CollUtil.isNotEmpty(erpOrderEntities)) {
orderDetailService.insertOrderDetail(erpOrderEntities); orderDetailService.insertOrderDetail(erpOrderEntities);
} }
} }

@ -26,4 +26,5 @@
from io_codes_temp from io_codes_temp
where orderId = #{orderId} where orderId = #{orderId}
</delete> </delete>
</mapper> </mapper>

@ -39,7 +39,10 @@
jrxmlPath=#{jrxmlPath}, jrxmlPath=#{jrxmlPath},
</if> </if>
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
customerId = #{customerId} customerId = #{customerId},
</if>
<if test="action != null and action != ''">
action = #{action}
</if> </if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}

Loading…
Cancel
Save