单据按di排序

test
anthonywj 1 year ago
parent 2cf78dc7b2
commit 4886f75d01

@ -37,10 +37,8 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap; import java.util.stream.Collectors;
import java.util.List;
import java.util.Map;
@Slf4j @Slf4j
@RestController @RestController
@ -108,6 +106,8 @@ public class BasicOrderPrintController {
List<Object> list = new ArrayList<>(); List<Object> list = new ArrayList<>();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式 SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式
String printThird = systemParamConfigService.selectValueByParamKey("order_print_by_thrproduct"); String printThird = systemParamConfigService.selectValueByParamKey("order_print_by_thrproduct");
String value = systemParamConfigService.selectValueByParamKey("order_detail_visible");
//查询打印格式 //查询打印格式
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(filterOrderPrintRequest.getAction()); BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(filterOrderPrintRequest.getAction());
//根据批次号打印 //根据批次号打印
@ -116,8 +116,15 @@ public class BasicOrderPrintController {
FilterOrderRequest filterOrderRequest = new FilterOrderRequest(); FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setBillNo(filterOrderPrintRequest.getOrderIdFk()); filterOrderRequest.setBillNo(filterOrderPrintRequest.getOrderIdFk());
IoOrderResponse ioOrderResponse = ioOrderService.filterList(filterOrderRequest).get(0); IoOrderResponse ioOrderResponse = ioOrderService.filterList(filterOrderRequest).get(0);
//查询业务单详情 //查询业务单详情
List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList = ioOrderDetailBizService.findByOrderId(filterOrderPrintRequest.getOrderIdFk()); List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList = ioOrderDetailBizService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
if (IntUtil.value(value) == 1) {
ioOrderDetailBizEntityList = ioOrderDetailBizEntityList.stream()
.sorted(Comparator.comparing(IoOrderDetailBizEntity::getNameCode))
.collect(Collectors.toList());
}
int i = 1; int i = 1;
if (ioOrderDetailBizEntityList != null && ioOrderDetailBizEntityList.size() > 0) { if (ioOrderDetailBizEntityList != null && ioOrderDetailBizEntityList.size() > 0) {
for (IoOrderDetailBizEntity obj : ioOrderDetailBizEntityList) { for (IoOrderDetailBizEntity obj : ioOrderDetailBizEntityList) {
@ -171,6 +178,11 @@ public class BasicOrderPrintController {
IoOrderResponse ioOrderResponse = ioOrderService.filterList(filterOrderRequest).get(0); IoOrderResponse ioOrderResponse = ioOrderService.filterList(filterOrderRequest).get(0);
//查询扫码单详情 //查询扫码单详情
List<IoCodeEntity> ioCodeEntityList = ioCodeService.findByOrderId(filterOrderPrintRequest.getOrderIdFk()); List<IoCodeEntity> ioCodeEntityList = ioCodeService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
if (IntUtil.value(value) == 1) {
ioCodeEntityList = ioCodeEntityList.stream()
.sorted(Comparator.comparing(IoCodeEntity::getNameCode))
.collect(Collectors.toList());
}
//查询业务单据表 //查询业务单据表
List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList = ioOrderDetailBizService.findByOrderId(filterOrderPrintRequest.getOrderIdFk()); List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList = ioOrderDetailBizService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
int i = 1; int i = 1;

@ -60,10 +60,8 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays; import java.util.stream.Collectors;
import java.util.Date;
import java.util.List;
/** /**
* *
@ -526,6 +524,12 @@ public class IoOrderDetailBizController extends BaseController {
@GetMapping("/udiwms/inout/bizDetail/filterList") @GetMapping("/udiwms/inout/bizDetail/filterList")
public BaseResponse filterList(FilterOrderDetailBizRequest orderDetailBizRequest) { public BaseResponse filterList(FilterOrderDetailBizRequest orderDetailBizRequest) {
List<IoOrderDetailBizResponse> list = orderDetailBizService.filterList(orderDetailBizRequest); List<IoOrderDetailBizResponse> list = orderDetailBizService.filterList(orderDetailBizRequest);
String value = systemParamConfigService.selectValueByParamKey("order_detail_visible");
if (IntUtil.value(value) == 1) {
list = list.stream()
.sorted(Comparator.comparing(IoOrderDetailBizResponse::getNameCode))
.collect(Collectors.toList());
}
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderDetailBizRequest.getOrderIdFk()); List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderDetailBizRequest.getOrderIdFk());
ioCheckInoutService.bizOrderCheck2(list, orderDetailCodeEntities); ioCheckInoutService.bizOrderCheck2(list, orderDetailCodeEntities);
PageInfo<IoOrderDetailBizResponse> pageInfo = new PageInfo<>(list); PageInfo<IoOrderDetailBizResponse> pageInfo = new PageInfo<>(list);

@ -12,11 +12,15 @@ import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.service.inout.IoCheckInoutService; import com.glxp.api.service.inout.IoCheckInoutService;
import com.glxp.api.service.inout.IoOrderDetailBizService; import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService; import com.glxp.api.service.inout.IoOrderDetailCodeService;
import com.glxp.api.service.system.SystemParamConfigService;
import com.glxp.api.util.IntUtil;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* *
@ -30,7 +34,8 @@ public class IoOrderDetailCodeController {
private IoCheckInoutService ioCheckInoutService; private IoCheckInoutService ioCheckInoutService;
@Resource @Resource
private IoOrderDetailBizService orderDetailBizService; private IoOrderDetailBizService orderDetailBizService;
@Resource
SystemParamConfigService systemParamConfigService;
//获取新增扫码单据详情---临时接口查询 //获取新增扫码单据详情---临时接口查询
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@ -53,6 +58,12 @@ public class IoOrderDetailCodeController {
@GetMapping("udiwms/inout/codeDetail/filterList") @GetMapping("udiwms/inout/codeDetail/filterList")
public BaseResponse filterList(FilterOrderDetailCodeRequest detailCodeRequest) { public BaseResponse filterList(FilterOrderDetailCodeRequest detailCodeRequest) {
List<IoOrderDetailCodeResponse> list = ioOrderDetailCodeService.filterList(detailCodeRequest); List<IoOrderDetailCodeResponse> list = ioOrderDetailCodeService.filterList(detailCodeRequest);
String value = systemParamConfigService.selectValueByParamKey("order_detail_visible");
if (IntUtil.value(value) == 1) {
list = list.stream()
.sorted(Comparator.comparing(IoOrderDetailCodeResponse::getNameCode))
.collect(Collectors.toList());
}
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(detailCodeRequest.getOrderIdFk()); List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(detailCodeRequest.getOrderIdFk());
ioCheckInoutService.codeOrderCheck2(list, orderDetailBizEntities); ioCheckInoutService.codeOrderCheck2(list, orderDetailBizEntities);
PageInfo<IoOrderDetailCodeResponse> pageInfo = new PageInfo<>(list); PageInfo<IoOrderDetailCodeResponse> pageInfo = new PageInfo<>(list);

@ -659,4 +659,9 @@ VALUES (2011, '待审核单据·', 2006, 5, NULL, NULL, NULL, 1, 0, 'F', '0', '0
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inPreInBack', 'tinyint', 1); CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inPreInBack', 'tinyint', 1);
INSERT ignore INTO sys_param_config(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`,
`paramType`, `paramExplain`, `updateTime`)
VALUES (20088, 0, '单据详情展示方式', 'order_detail_visible', '1', 0, 0, '1:按DI统一排序2按扫码或录入时间排序', NULL);

Loading…
Cancel
Save