出入库明细账修改,单据类型修改

master
anthonywj 2 years ago
parent 0e4e810f8b
commit 8316cc7f28

@ -21,8 +21,6 @@ public class Constant {
public static final String TH_ORDER = "TH"; //退货
/**
*
*/
@ -215,4 +213,20 @@ public class Constant {
public static final String ORDER_STATUS_SUP_SEARCH = "supSearch";
/**前端页面查询相关单据类型标识*/
/**
* supDelivery
* supArrival
* 退 supReturned
* supPurchase
* supInvoice
* norDetail
* preDetail
*/
public static final String ORDER_ACTION_NOR_DETAIL = "norDetail";
public static final String ORDER_ACTION_PRE_DETAIL = "preDetail";
}

@ -73,6 +73,11 @@ public class IoOrderController extends BaseController {
if (StrUtil.isNotBlank(filterOrderRequest.getStatusType())) {
orderService.setFilterStatus(filterOrderRequest);
}
if (StrUtil.isNotBlank(filterOrderRequest.getActionType())) {
orderService.setActions(filterOrderRequest);
}
String customerId = getCustomerId();
if (!customerId.equals("110")) {
filterOrderRequest.setFromCorp(customerId);
@ -226,9 +231,6 @@ public class IoOrderController extends BaseController {
}
@Resource
IoCodeService codeService;

@ -1,5 +1,6 @@
package com.glxp.api.controller.inout;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
@ -13,6 +14,7 @@ import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.req.inout.FilterCodeRequest;
import com.glxp.api.req.inout.FilterOrderDetailResultRequest;
import com.glxp.api.req.inout.FilterOrderRequest;
import com.glxp.api.res.inout.IoCodeResponse;
import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
@ -67,7 +69,13 @@ public class IoOrderDetailResultController extends BaseController {
} else {
orderDetailResultRequest.setFromCorp(getCustomerId());
}
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setActionType(orderDetailResultRequest.getActionType());
List<String> actions = orderService.setActions(filterOrderRequest);
if (CollUtil.isEmpty(actions)) {
return ResultVOUtils.success("");
}
orderDetailResultRequest.setActions(actions);
List<IoOrderDetailResultResponse> list = orderDetailResultService.filterOrderList(orderDetailResultRequest);
// for (IoOrderDetailResultResponse orderDetailResultResponse : list) {

@ -8,6 +8,7 @@ import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.inv.InvProductDetailEntity;
import com.glxp.api.entity.inv.InvProductEntity;
import com.glxp.api.req.inv.FilterInvProductDetailRequest;
@ -39,7 +40,7 @@ import java.util.List;
*/
@Slf4j
@RestController
public class InvProductController {
public class InvProductController extends BaseController {
@Resource
private InvProductService invProductService;
@ -51,7 +52,6 @@ public class InvProductController {
private CustomerService customerService;
/**
*
*
@ -65,6 +65,7 @@ public class InvProductController {
filterInvProductRequest.setNameCode(FilterUdiUtils.getDiStr(filterInvProductRequest.getUdiCode()));
}
if (StrUtil.isBlank(filterInvProductRequest.getInvCode())) {
List<String> invCodes = warehouseUserService.selectCodeByUser(customerService.getUserIdStr());
if (CollUtil.isNotEmpty(invCodes)) {
@ -72,6 +73,13 @@ public class InvProductController {
}
}
if (isHosUser()) {
} else {
filterInvProductRequest.setSupId(getCustomerId());
}
List<InvProductResponse> list = invProductService.filterListProduct(filterInvProductRequest);
PageInfo<InvProductResponse> pageInfo = new PageInfo<>(list);
InvProductPageResponse<InvProductResponse> pageResponse = new InvProductPageResponse();

@ -1,6 +1,7 @@
package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.req.basic.FilterBussinessTypeRequest;
import com.glxp.api.res.basic.BasicBussinessTypeResponse;
@ -10,7 +11,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface BasicBussinessTypeDao extends BaseMapper<BasicBussinessTypeEntity> {
public interface BasicBussinessTypeDao extends BaseMapperPlus<BasicBussinessTypeDao, BasicBussinessTypeEntity, BasicBussinessTypeEntity> {
/**

@ -358,7 +358,7 @@ public class BasicBussinessTypeEntity {
@TableField(value = "busType")
private Integer busType; //1:正常2送货3.到货,4:退货
@TableField(value = "inStock")
@TableField(value = "inStock") //是否更改库存10
private boolean inStock;

@ -3,6 +3,8 @@ package com.glxp.api.req.inout;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.List;
/**
*
*/
@ -40,6 +42,6 @@ public class FilterOrderDetailResultRequest extends ListPageRequest {
private String startAduditTime; //起始日期
private String endAduditTime; //结束日期
private String fromCorp;
private String actionType;
private List<String> actions;
}

@ -145,7 +145,8 @@ public class FilterOrderRequest extends ListPageRequest {
* 退 supReturned
* supPurchase
* supInvoice
* norDetail
* norDetail
* preDetail
*/
private String actionType;
@ -153,6 +154,11 @@ public class FilterOrderRequest extends ListPageRequest {
private Integer orderType;
private Integer syncStatus;
/**
*
*/
private List<String> actions;
/**
*
*/

@ -71,6 +71,8 @@ public class InvPreinDetailResponse {
private String auditTime;
private String billNo;
private String invName;
private String measname;
private String fromName;
}

@ -74,6 +74,8 @@ public interface IoOrderService {
*/
void setFilterStatus(FilterOrderRequest filterOrderRequest);
List<String> setActions(FilterOrderRequest filterOrderRequest);
/**
*
*

@ -526,7 +526,7 @@ public class IoOrderServiceImpl implements IoOrderService {
break;
case Constant.ORDER_STATUS_AUDITED:
filterOrderRequest.setStatuses(Arrays.asList(7));
filterOrderRequest.setDealStatuses(Arrays.asList(3,4));
filterOrderRequest.setDealStatuses(Arrays.asList(3, 4));
break;
case Constant.ORDER_STATUS_SUP_SEARCH:
filterOrderRequest.setStatuses(Arrays.asList(5, 7));
@ -537,6 +537,36 @@ public class IoOrderServiceImpl implements IoOrderService {
}
}
@Override
public List<String> setActions(FilterOrderRequest filterOrderRequest) {
List<BasicBussinessTypeEntity> bussinessTypeEntities;
List<String> actions = null;
if (filterOrderRequest.getActionType() == null)
return null;
switch (filterOrderRequest.getActionType()) {
case Constant.ORDER_ACTION_NOR_DETAIL:
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("actionType", 1).eq("inStock", true));
actions = bussinessTypeEntities.stream().map(BasicBussinessTypeEntity::getAction).collect(Collectors.toList());
filterOrderRequest.setActions(actions);
break;
case Constant.ORDER_ACTION_PRE_DETAIL:
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("actionType", 3).eq("inStock", true));
actions = bussinessTypeEntities.stream().map(BasicBussinessTypeEntity::getAction).collect(Collectors.toList());
filterOrderRequest.setActions(actions);
break;
default:
break;
}
;
return actions;
}
@Override
public List<IoOrderEntity> filterOrderTrace(String billNo) {
IoOrderEntity order = orderDao.selectOne(new QueryWrapper<IoOrderEntity>().eq("billNo", billNo));

@ -52,6 +52,13 @@
<if test="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''">
AND date_format(auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and date_format(#{endAduditTime}, '%Y-%m-%d')
</if>
<if test="actions != null and actions.size() != 0">
AND `action` in
<foreach collection="actions" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="statuses != null and statuses.size() != 0">
AND status in
<foreach collection="statuses" index="index" item="item" open="(" close=")" separator=",">

@ -24,7 +24,8 @@
</select>
<select id="filterOrderList" resultType="com.glxp.api.res.inout.IoOrderDetailResultResponse">
SELECT a2.*,a1.mainAction,
SELECT a2.*,
a1.mainAction,
b1.NAME AS fromCorpName,
(SELECT NAME FROM basic_bussiness_type bus WHERE bus.action = a1.action) billTypeName
FROM io_order_detail_result a2
@ -58,6 +59,12 @@
<if test="productName != null and productName != ''">
AND a2.coName like concat('%', #{productName}, '%')
</if>
<if test="actions != null and actions.size() != 0">
AND a1.`action` in
<foreach collection="actions" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

@ -8,14 +8,17 @@
bp.ggxh,
bp.manufactory,
bp.zczbhhzbapzbh,
bp.measname,
inv_prein_order.auditTime,
inv_prein_order.billNo,
aw.name invName
aw.name invName,
bc.name fromName
from inv_prein_detail ic
inner join inv_prein_order on orderId = inv_prein_order.billNo
left join basic_udirel bu on bu.id = ic.relId
left join basic_products bp on bu.uuid = bp.uuid
left join auth_warehouse aw on inv_prein_order.invCode = aw.code
left join basic_corp bc on inv_prein_order.fromCorp = bc.erpId
<where>
<if test="orderId != null and orderId != ''">
AND ic.orderId = #{orderId}

Loading…
Cancel
Save