1.调整优化

2.增加作业计划反馈定位功能
master
董哲奇 2 years ago
parent 191be19076
commit 6228fa823b

@ -21,7 +21,10 @@ import com.dsic.gj_erp.service.kc.ImCkwpkwpService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.sis.internal.jaxb.metadata.EX_Extent; import org.apache.sis.internal.jaxb.metadata.EX_Extent;
import org.mapstruct.factory.Mappers; import org.mapstruct.factory.Mappers;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -49,6 +52,7 @@ import java.util.stream.Stream;
@RequestMapping("/dmYdjh") @RequestMapping("/dmYdjh")
public class DmYdjhController { public class DmYdjhController {
private static final Logger log = LoggerFactory.getLogger(DmYdjhController.class);
@Autowired @Autowired
private DmYdjhService service; private DmYdjhService service;
@Autowired @Autowired
@ -57,6 +61,12 @@ public class DmYdjhController {
@Autowired @Autowired
private DmCzplpNewService czplpNewService; private DmCzplpNewService czplpNewService;
@PostMapping("save")
public ResultBean<?> save(@RequestBody List<DmYdjh> list){
service.updateBatchById(list);
return new ResultBean<>();
}
@RequestMapping("/getList") @RequestMapping("/getList")
@AuthFunction @AuthFunction
public ResultBean getList(@RequestBody Map<String, String> map ) { public ResultBean getList(@RequestBody Map<String, String> map ) {

@ -49,61 +49,6 @@ import static com.dsic.gj_erp.pc.Manager.*;
@Slf4j @Slf4j
public class DataFactory { public class DataFactory {
public static void 排产2() {
装载中日程数据();
套料图所占工序的资源.clear();
Manager.排产结果=new ArrayList<>();
List<钢料需求> list=读取钢料需求();
工序CD接口 _工序CD接口 = getBean(工序CD接口.class);
List<工序CD> 工序CDS = _工序CD接口.get();
Map<Constant.工序,工序CD> 工序CDMap=new HashMap<>();
工序CDS.forEach(item->工序CDMap.put(item.getGx(),item));
执行排产(list,工序CDMap);
清理冗余数据(list);
if (Manager.排产结果.size()>0){
log.info("排产异常--{}个未完整排产,{}",Manager.排产结果.size(),Manager.排产结果);
}
}
private static void 执行排产(List<钢料需求> list, Map<Constant.工序, 工序CD> 工序CDMap){
list.forEach(钢料需求 -> {
CountDownLatch latch = new CountDownLatch(钢料需求.getBomList().size());
String xzglxq = 钢料需求.getXzglxq();
String dzglxq = 钢料需求.getDzglxq();
钢料需求.getBomList().forEach(bom -> {
套料图工序 _套料图工序 = 套料图工序工厂(bom);
//套料图未定义/定义错误
if (_套料图工序==null){
latch.countDown();
return;
}
_套料图工序.setXzglxq(xzglxq);
_套料图工序.setDzglxq(dzglxq);
_套料图工序.set工序CD(工序CDMap);
_套料图工序.set中日程(获取中日程(bom.getDcch() + bom.getPl() + bom.getFd()));
es.execute(() -> {
try{
_套料图工序.run();
}finally {
latch.countDown();
}
});
});
try {
latch.await(10, TimeUnit.SECONDS);// 指定超时时间
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
});
}
private static DmZrcjh 获取中日程(String key){ private static DmZrcjh 获取中日程(String key){
return getBean(DmZrcjhService.class).排产获取中日程数据(key); return getBean(DmZrcjhService.class).排产获取中日程数据(key);
} }
@ -125,24 +70,6 @@ public class DataFactory {
}); });
} }
public static void 排产3(){
装载中日程数据();
套料图所占工序的资源.clear();
Manager.排产结果=new ArrayList<>();
List<钢料需求> list=读取钢料需求();
Collection<按批次合并的钢料需求> 按批次合并 = 按批次合并(list);
计算需求产能(按批次合并);
try {
均衡预占(按批次合并);
}catch (Exception e){
e.printStackTrace();
}finally {
清理冗余数据(list);
}
}
public static void 排产4(){ public static void 排产4(){
装载中日程数据(); 装载中日程数据();
套料图所占工序的资源.clear(); 套料图所占工序的资源.clear();
@ -207,9 +134,6 @@ public class DataFactory {
//记录6次计算的全部资源 //记录6次计算的全部资源
tmpList.add(_资源); tmpList.add(_资源);
if (_资源.判断切割设备是否可以被占用(切割各设备需求量)){ if (_资源.判断切割设备是否可以被占用(切割各设备需求量)){
if (item.getDcCh().equals("G175K-5")&&item.getDcPl().equals("003")){
System.out.println(111);
}
执行排产(item.getBomList(),item.get均衡需求日期(),工序CDMap); 执行排产(item.getBomList(),item.get均衡需求日期(),工序CDMap);
break; break;
} }
@ -224,11 +148,7 @@ public class DataFactory {
//查找最小可用资源,进行占用 //查找最小可用资源,进行占用
tmpList.sort(Comparator.comparingDouble((tmp)->tmp.get工序产能MAP().get(Constant.工序.切割).get占用())); tmpList.sort(Comparator.comparingDouble((tmp)->tmp.get工序产能MAP().get(Constant.工序.切割).get占用()));
tmpList.stream().findFirst().ifPresent(tmp->{ tmpList.stream().findFirst().ifPresent(tmp->{
//由于资源日为切割日期,这里需要还原一下,修正传递的参照需求日期 DateTime offset = DateUtil.parse(tmp.getDate()).offset(DateField.DAY_OF_MONTH, -工序CDMap.get(依据工序).getCd());
DateTime offset = tmp.get_date().offset(DateField.DAY_OF_MONTH, -工序CDMap.get(依据工序).getCd());
if (item.getDcCh().equals("G175K-5")&&item.getDcPl().equals("003")){
System.out.println(offset.toDateStr());
}
执行排产(item.getBomList(),offset,工序CDMap); 执行排产(item.getBomList(),offset,工序CDMap);
date.set(tmp.getDate()); date.set(tmp.getDate());
}); });
@ -242,91 +162,6 @@ public class DataFactory {
log.info("船号:{},批次:{},占用资源成功,切割日期:{}",item.getDcCh(),item.getDcPl(),date.get()); log.info("船号:{},批次:{},占用资源成功,切割日期:{}",item.getDcCh(),item.getDcPl(),date.get());
} }
public static void 均衡预占(Collection<按批次合并的钢料需求> _按批次合并的钢料需求){
工序CD接口 _工序CD接口 = getBean(工序CD接口.class);
List<工序CD> 工序CDS = _工序CD接口.get();
Map<Constant.工序,工序CD> 工序CDMap=new HashMap<>();
工序CDS.forEach(item->工序CDMap.put(item.getGx(),item));
for (按批次合并的钢料需求 item:_按批次合并的钢料需求){
if (ObjUtil.isNotEmpty(item.getBomList())){
均衡计算(item,工序CDMap);
}
}
}
private static void 均衡计算(按批次合并的钢料需求 item,Map<Constant.工序,工序CD> 工序CDMap){
Constant.工序 依据工序=Constant.工序.切割;
//需求日期可利用范围是±3天
int times=-3;
List<资源> tmpList=new ArrayList<>();
AtomicDouble atomicDouble = item.get产能需求().get(依据工序);
资源 _资源=null;
do {
//因为第一次计算时候就是当前批量小组需求日期,所以再次循环到的时候不需要再次计算
if (times==0){
times+=1;
continue;
}
if (times>3){
break;
}
DateTime xzglxq = item.get均衡需求日期().offset(DateField.DAY_OF_YEAR,工序CDMap.get(依据工序).getCd());
if (xzglxq.isBefore(DateUtil.date())){
break;
}
_资源 = 提取资源(xzglxq);
if (_资源.get_date().isBefore(DateUtil.date())){
break;
}
tmpList.add(_资源);
if (_资源.判断工序是否可以被占用(依据工序,atomicDouble.get())){
// DateTime 上料日期 = item.get均衡需求日期().offset(DateField.DAY_OF_YEAR, -14);
// 资源 上料 = 提取资源(上料日期);
// for (Bom bom:item.getBomList()){
// 上料.占用资源(Constant.工序.上料,bom,item.get产能需求().get(Constant.工序.上料).get());
// _资源.占用资源(Constant.工序.切割,bom,1);
// }
if (item.getDcCh().equals("G175K-4")&&item.getDcPl().equals("020")){
System.out.println(111);
}
执行排产(item.getBomList(),item.get均衡需求日期(),工序CDMap);
break;
}
//需求日期可利用范围是±3天,排产是需要根据产能进行调整
item.set均衡需求日期(DateUtil.offsetDay(item.get均衡需求日期(),times));
times+=1;
}while (true);
//若在需求期±3天内无法正常排产时,查找最大可用空闲资源进行占用
AtomicReference<String> date=new AtomicReference<>();
if (times>3){
//查找最小可用资源,进行占用
tmpList.sort(Comparator.comparingDouble((tmp)->tmp.get工序产能MAP().get(Constant.工序.切割).get占用()));
tmpList.stream().findFirst().ifPresent(tmp->{
// DateTime 上料日期 = item.get均衡需求日期().offset(DateField.DAY_OF_YEAR, -14);
// 资源 上料 = 提取资源(上料日期);
// for (Bom bom:item.getBomList()){
// 上料.占用资源(Constant.工序.上料,bom,item.get产能需求().get(Constant.工序.上料).get());
// tmp.占用资源(Constant.工序.切割,bom,1);
// }
//由于资源日为切割日期,这里需要还原一下,修正传递的参照需求日期
if (item.getDcCh().equals("G175K-4")&&item.getDcPl().equals("020")){
System.out.println(111);
}
执行排产(item.getBomList(),tmp.get_date().offset(DateField.DAY_OF_YEAR,-工序CDMap.get(依据工序).getCd()),工序CDMap);
date.set(tmp.getDate());
});
}
if (_资源!=null){
date.set(_资源.getDate());
log.info("船号:{},批次:{},占用资源成功,切割日期:{}",item.getDcCh(),item.getDcPl(),date.get());
}else {
log.info("船号:{},批次:{},早于当前日期无需排产",item.getDcCh(),item.getDcPl());
}
}
private static void 执行排产(List<Bom> list,DateTime 参照需求日期,Map<Constant.工序,工序CD> 工序CDMap){ private static void 执行排产(List<Bom> list,DateTime 参照需求日期,Map<Constant.工序,工序CD> 工序CDMap){
CountDownLatch latch = new CountDownLatch(list.size()); CountDownLatch latch = new CountDownLatch(list.size());
for (Bom bom:list){ for (Bom bom:list){
@ -358,11 +193,6 @@ public class DataFactory {
} }
} }
private static void 计算需求产能(Collection<按批次合并的钢料需求> _按批次合并的钢料需求){
_按批次合并的钢料需求.forEach(按批次合并的钢料需求::计算各工序产能需求);
}
private static List<钢料需求> 合并批次(List<钢料需求> list){ private static List<钢料需求> 合并批次(List<钢料需求> list){
Map<String,钢料需求> map=new HashMap<>(); Map<String,钢料需求> map=new HashMap<>();
list.forEach(item->{ list.forEach(item->{
@ -377,16 +207,6 @@ public class DataFactory {
return new ArrayList<>(map.values()); return new ArrayList<>(map.values());
} }
private static Collection<按批次合并的钢料需求> 按批次合并(List<钢料需求> list){
Map<String,按批次合并的钢料需求> map=new HashMap<>();
list.forEach(item->{
String key=item.getDcCh() + item.getDcPl();
按批次合并的钢料需求 _按批次合并的钢料需求 = map.computeIfAbsent(key, k -> new 按批次合并的钢料需求());
_按批次合并的钢料需求.of(item);
});
return map.values();
}
public static List<钢料需求> 读取钢料需求1(){ public static List<钢料需求> 读取钢料需求1(){
List<DmSygdxq> 按需求日期排序的钢料需求 = getBean(DmSygdxqService.class).getXqWithBom(from, to); List<DmSygdxq> 按需求日期排序的钢料需求 = getBean(DmSygdxqService.class).getXqWithBom(from, to);
return 按需求日期排序的钢料需求.stream().map(item->{ return 按需求日期排序的钢料需求.stream().map(item->{
@ -396,11 +216,6 @@ public class DataFactory {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
public static List<钢料需求> 读取钢料需求(){
List<DmSygdxq> 按需求日期排序的钢料需求 = getBean(DmSygdxqService.class).getXqWithBom(from, to);
return 按需求日期排序的钢料需求.stream().map(钢料需求::of).collect(Collectors.toList());
}
private static Map<String,List<订货计划>> _订货计划=new HashMap<>(); private static Map<String,List<订货计划>> _订货计划=new HashMap<>();
public static List<订货计划> 获取订货计划(String dcch){ public static List<订货计划> 获取订货计划(String dcch){
List<订货计划> list=_订货计划.get(dcch); List<订货计划> list=_订货计划.get(dcch);
@ -412,17 +227,6 @@ public class DataFactory {
return map.get(dcch); return map.get(dcch);
} }
public static Optional<资源> 搜索可用资源(Constant.工序 工序,Date 搜索起始日期,Date 搜索截止日期, double 需求数量){
return 资源池.values().stream().filter(资源->{
工序产能 工序产能 = 资源.get工序产能MAP().get(工序);
Date 资源日期=DateUtil.parse(资源.getDate(),"yyyy/MM/dd");
if (工序产能==null){
return false;
}
return 工序产能.判断是否可以占用(需求数量)&&资源日期.after(搜索起始日期)&&资源日期.before(搜索截止日期);
}).findFirst();
}
public static 资源 提取资源(Date date){ public static 资源 提取资源(Date date){
资源 资源 = 资源池.get(DateUtil.format(date, "yyyy/MM/dd")); 资源 资源 = 资源池.get(DateUtil.format(date, "yyyy/MM/dd"));
if (资源==null){ if (资源==null){

@ -3,6 +3,7 @@ package com.dsic.gj_erp.pc.dto;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.dsic.gj_erp.pc.Constant; import com.dsic.gj_erp.pc.Constant;
import com.dsic.gj_erp.pc.dto.data.Bom; import com.dsic.gj_erp.pc.dto.data.Bom;
import com.google.common.util.concurrent.AtomicDouble; import com.google.common.util.concurrent.AtomicDouble;
@ -59,9 +60,6 @@ public class 资源 {
public boolean 占用资源(Constant.工序 工序, Bom bom, double 产能消耗){ public boolean 占用资源(Constant.工序 工序, Bom bom, double 产能消耗){
AtomicBoolean atomicBoolean = new AtomicBoolean(false); AtomicBoolean atomicBoolean = new AtomicBoolean(false);
if (bom.getTzbh().equals("B020N4PX004")){
System.out.println(111);
}
工序产能 工序产能 = 工序产能MAP.get(工序); 工序产能 工序产能 = 工序产能MAP.get(工序);
Optional.ofNullable(工序产能).ifPresent(it->{ Optional.ofNullable(工序产能).ifPresent(it->{
if (it.产能==0){ if (it.产能==0){
@ -104,10 +102,15 @@ public class 资源 {
public static 资源 of(String date,Map<Constant.工序,工序产能> 工序产能MAP){ public static 资源 of(String date,Map<Constant.工序,工序产能> 工序产能MAP){
资源 资源 = new 资源(); 资源 资源 = new 资源();
资源.date=date; 资源.date=date;
资源._date= DateUtil.parse(date,"yyyy/MM/dd"); 资源._date= DateUtil.parse(date,"yyyy/MM/dd");
资源.工序产能MAP=工序产能MAP; 资源.工序产能MAP=工序产能MAP;
return 资源; return 资源;
} }
private 资源(){} private 资源(){}
public String toString(){
return JSONObject.toJSONString(this);
}
} }

@ -12,10 +12,12 @@ import com.dsic.gj_erp.bean.jhgk.DmSygdMxLj;
import com.dsic.gj_erp.bean.jhgk.DmYdjhxf; import com.dsic.gj_erp.bean.jhgk.DmYdjhxf;
import com.dsic.gj_erp.mapper.jhgk.DmSygdxqMapper; import com.dsic.gj_erp.mapper.jhgk.DmSygdxqMapper;
import com.dsic.gj_erp.pc.Manager; import com.dsic.gj_erp.pc.Manager;
import com.dsic.gj_erp.service.jhgk.DmSygdMxLjService;
import com.dsic.gj_erp.service.jhgk.DmSygdMxService; import com.dsic.gj_erp.service.jhgk.DmSygdMxService;
import com.dsic.gj_erp.service.jhgk.DmSygdService; import com.dsic.gj_erp.service.jhgk.DmSygdService;
import com.dsic.gj_erp.service.jhgk.impl.DmSygdMxLjServiceImpl; import com.dsic.gj_erp.service.jhgk.impl.DmSygdMxLjServiceImpl;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -23,12 +25,13 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Slf4j
@Service @Service
@AllArgsConstructor @AllArgsConstructor
public class 三月滚动接口 { public class 三月滚动接口 {
private final DmSygdxqMapper sygdxqMapper; private final DmSygdxqMapper sygdxqMapper;
private final DmSygdMxLjServiceImpl ljService; private final DmSygdMxLjService ljService;
private final DmSygdMxService sygdMxService; private final DmSygdMxService sygdMxService;
private final DmSygdService sygdService; private final DmSygdService sygdService;
@ -51,17 +54,18 @@ public class 三月滚动接口 {
//2.根据 //2.根据
List<DmSygdMx> mxList = ljList.stream().map(DmSygdMx::ofWithDmSygdMxlj).collect(Collectors.toList()); List<DmSygdMx> mxList = ljList.stream().map(DmSygdMx::ofWithDmSygdMxlj).collect(Collectors.toList());
Map<String, List<DmSygdMx>> collect = mxList.stream().collect(Collectors.groupingBy(item -> item.getDcCh() + item.getDcPl() + item.getTzbh())); Map<String, List<DmSygdMx>> collect = mxList.stream().collect(Collectors.groupingBy(item -> item.getDcCh() + item.getDcPl()));
DateTime from = DateUtil.parse(begin, "yyyy/MM/dd"); DateTime from = DateUtil.parse(begin, "yyyy/MM/dd");
DateTime to = DateUtil.parse(end, "yyyy/MM/dd"); DateTime to = DateUtil.parse(end, "yyyy/MM/dd");
Manager.资源池.values().parallelStream() Manager.资源池.values().stream()
.filter(_资源->DateUtil.isIn(_资源.get_date(),from,to)) // .filter(_资源->DateUtil.isIn(_资源.get_date(),from,to))
.forEach(_资源->{_资源.get工序产能MAP().values().forEach(_工序产能->{ .forEach(_资源->{
_资源.get工序产能MAP().values().forEach(_工序产能->{
_工序产能.get设备().values().forEach(_设备->{ _工序产能.get设备().values().forEach(_设备->{
_设备.get资源占用图表().parallelStream().forEach(_bom->{ _设备.get资源占用图表().forEach(_bom->{
List<DmSygdMx> dmSygdMxes = collect.get(_bom.getDcch() + _bom.getPl() + _bom.getTzbh()); List<DmSygdMx> dmSygdMxes = collect.get(_bom.getDcch() + _bom.getPl());
for (DmSygdMx mx:dmSygdMxes){ for (DmSygdMx mx:dmSygdMxes){
mx.更新排产信息(_工序产能.get工序(),_资源.getDate()); mx.更新排产信息(_工序产能.get工序(),_资源.getDate());
} }
@ -70,7 +74,7 @@ public class 三月滚动接口 {
}); });
}); });
//sygdMxService.saveBatch(mxList,500); sygdMxService.saveBatch(mxList,500);
ljList.forEach(lj-> mxList.forEach(mx->{ ljList.forEach(lj-> mxList.forEach(mx->{
if (lj.getDcch().equals(mx.getDcCh()) if (lj.getDcch().equals(mx.getDcCh())
@ -79,7 +83,7 @@ public class 三月滚动接口 {
lj.setParentId(mx.getId()); lj.setParentId(mx.getId());
} }
})); }));
//ljService.saveBatch(ljList,500); ljService.saveBatch(ljList,500);
List<DmYdjhxf> list= sygdMxService.tqSygd1(begin,end); List<DmYdjhxf> list= sygdMxService.tqSygd1(begin,end);
ResultBean r = new ResultBean(list); ResultBean r = new ResultBean(list);

@ -11,8 +11,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsic.gj_erp.bean.jhgk.DmQfxq; import com.dsic.gj_erp.bean.jhgk.DmQfxq;
import com.dsic.gj_erp.bean.jhgk.DmSygdMx; import com.dsic.gj_erp.bean.jhgk.DmSygdMx;
import com.dsic.gj_erp.bean.jhgk.DmYdjh; import com.dsic.gj_erp.bean.jhgk.DmYdjh;
import com.dsic.gj_erp.bean.jhgk.DmYdjhLj;
import com.dsic.gj_erp.mapper.jhgk.DmQfxqMapper; import com.dsic.gj_erp.mapper.jhgk.DmQfxqMapper;
import com.dsic.gj_erp.service.jhgk.DmQfxqService; import com.dsic.gj_erp.service.jhgk.DmQfxqService;
import com.dsic.gj_erp.service.jhgk.DmYdjhLjService;
import com.dsic.gj_erp.service.jhgk.DmYdjhService; import com.dsic.gj_erp.service.jhgk.DmYdjhService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -36,6 +38,9 @@ public class DmQfxqServiceImpl extends ServiceImpl<DmQfxqMapper, DmQfxq> impleme
@Resource @Resource
private DmYdjhService ydjhService; private DmYdjhService ydjhService;
@Resource
private DmYdjhLjService ljService;
@Override @Override
@Transactional @Transactional
public List<DmQfxq> saveXzList(List<DmQfxq> list, String username, String day){ public List<DmQfxq> saveXzList(List<DmQfxq> list, String username, String day){
@ -190,6 +195,9 @@ public class DmQfxqServiceImpl extends ServiceImpl<DmQfxqMapper, DmQfxq> impleme
l.setJssjOld(StrUtil.isEmpty(l.getJssj())?"":l.getJssj()); l.setJssjOld(StrUtil.isEmpty(l.getJssj())?"":l.getJssj());
l.setJssj(l.getXzglxq()); l.setJssj(l.getXzglxq());
} }
if (StrUtil.isEmpty(l.getTzbh())){
l.setJhlx("3");
}
}); });
ydjhService.saveBatch(ydjhList); ydjhService.saveBatch(ydjhList);
} }
@ -222,6 +230,11 @@ public class DmQfxqServiceImpl extends ServiceImpl<DmQfxqMapper, DmQfxq> impleme
.eq(DmYdjh::getDcPl,dcPl) .eq(DmYdjh::getDcPl,dcPl)
.in(DmYdjh::getTzbh,list) .in(DmYdjh::getTzbh,list)
); );
ljService.remove(Wrappers.<DmYdjhLj>lambdaQuery()
.eq(DmYdjhLj::getCzbh,dcCh)
.eq(DmYdjhLj::getPl,dcPl)
.in(DmYdjhLj::getTlth,list)
);
} }
} }

@ -53,7 +53,7 @@
from from
dm_sygdxq xq left join dm_bom bom on bom.dcch = xq.DC_CH and bom.pl = xq.DC_PL and bom.fd = xq.DC_FD dm_sygdxq xq left join dm_bom bom on bom.dcch = xq.DC_CH and bom.pl = xq.DC_PL and bom.fd = xq.DC_FD
where where
xq.xzglxq between #{from} and #{to} xq.xzglxq between #{from} and #{to} and bom.type='b'
<if test="dcch!=null and dcch!=''"> <if test="dcch!=null and dcch!=''">
and xq.DC_CH=#{dcch} and xq.DC_CH=#{dcch}
</if> </if>
@ -122,7 +122,7 @@
and dm_bom.pl = dm_sygdxq.DC_PL and dm_bom.pl = dm_sygdxq.DC_PL
and dm_bom.fd = dm_sygdxq.DC_FD and dm_bom.fd = dm_sygdxq.DC_FD
where where
dm_sygdxq.xzglxq between #{begin} and #{end} dm_sygdxq.xzglxq between #{begin} and #{end} and dm_bom.type = 'b'
ORDER BY dm_sygdxq.xzglxq,dm_sygdxq.DC_CH,dm_sygdxq.DC_PL,dm_bom.TZBH,dm_sygdxq.DC_FD ORDER BY dm_sygdxq.xzglxq,dm_sygdxq.DC_CH,dm_sygdxq.DC_PL,dm_bom.TZBH,dm_sygdxq.DC_FD
</select> </select>

Loading…
Cancel
Save