1.图纸计划派工单 取消分段 增加编制人编制日期记录

2.抛丸 增加 理料垛位 层数 批量选择
3.上料垮位查询条件 改为单据号 单据号查询逻辑未知
4.划线垛位 层数取消
5.按工序查看作业计划
master
董哲奇 5 months ago
parent 13f06857d4
commit edb36cfc68

@ -23,4 +23,10 @@ public class PwExcel {
@ExcelProperty(value = "备注")
public String bz;
@ExcelProperty(value = "理料垛位")
public String lldw;
@ExcelProperty(value = "层数")
private String llcs;
}

@ -59,7 +59,7 @@ public class YcldwInfo {
this.baifang();
}
private void baifang(){
public void baifang(){
this.zt=ZtEnum.BF;
}

@ -154,7 +154,7 @@ public class DmSygdMxController {
EasyExcel.read(file.getInputStream(), JhxfExcel.class, objectListener).sheet(0).headRowNumber(1).doRead();
List<JhxfExcel> objList = objectListener.getObjectList();
ydjhImportService.handler(objList);
ydjhImportService.handler(objList,req);
// service.ydjhImport(objList);
return new ResultBean();

@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dsic.gj_erp.annotation.AuthFunction;
import com.dsic.gj_erp.bean.ResultBean;
@ -53,16 +54,31 @@ public class ZyjhController {
*/
@PostMapping("pwdr")
@AuthFunction
@Transactional(rollbackFor = Exception.class)
public ResultBean<?> pwdr(MultipartFile file,HttpServletRequest request) throws IOException {
String yhdm= (String) request.getAttribute("yhdm");
String yhms= (String) request.getAttribute("yhms");
String date=DateUtil.date().toString("yyyy/MM/dd HH:mm:ss");
ExcelPwListener excelPwListener = new ExcelPwListener();
EasyExcel.read(file.getInputStream(), PwExcel.class, excelPwListener).sheet(0).headRowNumber(1).doRead();
List<PwExcel> objList = excelPwListener.getObjectList();
objList.forEach(item-> {
Ycldw ycldw = ycldwService.getOne(new QueryWrapper<Ycldw>().select("top 1 *").eq("name", item.getLldw()));
Integer dwId=null;
if (ycldw!=null){
dwId=ycldw.getId();
}
DmYdjh ydjh = zyjhService.getOne(new QueryWrapper<DmYdjh>()
.eq("dc_ch", item.getDcCh())
.eq("dc_pl", item.getDcPl())
.eq("dc_fd", item.getDcFd())
.eq("tzbh", item.getTlth())
);
zyjhService.update(Wrappers.<DmYdjh>lambdaUpdate()
.set(DmYdjh::getPwfkrq,date).set(DmYdjh::getPwfkry,yhdm)
.set(DmYdjh::getLldw,dwId).set(DmYdjh::getLlcs,item.getLlcs())
.eq(DmYdjh::getDcCh, item.getDcCh())
.eq(DmYdjh::getDcPl, item.getDcPl())
.eq(DmYdjh::getDcFd, item.getDcFd())
@ -74,6 +90,33 @@ public class ZyjhController {
.eq(YcldwInfo::getFd, item.getDcFd())
.eq(YcldwInfo::getTlth, item.getTlth())
);
YcldwInfo ycldwInfo = new YcldwInfo();
ycldwInfo.setDwId(dwId);
try {
ycldwInfo.setCeng(Integer.parseInt(item.getLlcs()));
}catch (Exception ignored){}
try {
ycldwInfo.setYdid(ydjh.getId());
ycldwInfo.setKw(ydjh.getKw());
ycldwInfo.setZl(ydjh.getZl());
ycldwInfo.setWph(ydjh.getWpxh());
ycldwInfo.setWlh(ydjh.getSlwlh());
ycldwInfo.setLph(ydjh.getSllph());
ycldwInfo.setWpgg(ydjh.getWpgg());
ycldwInfo.setNbsbm(ydjh.getNbsbm());
ycldwInfo.setSljhrq(ydjh.getSljhrq());
ycldwInfo.setQgjhrq(ydjh.getQgjhrq());
ycldwInfo.setBfr(yhms);
ycldwInfo.setBfrq(date);
}catch (Exception ignored){}
ycldwInfo.setCzbh(item.getDcCh());
ycldwInfo.setPl(item.getDcPl());
ycldwInfo.setFd(item.getDcFd());
ycldwInfo.setTlth(item.getTlth());
ycldwInfo.baifang();
ycldwInfoService.save(ycldwInfo);
});
return new ResultBean<>();

@ -1,6 +1,7 @@
package com.dsic.gj_erp.service.jhgk.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -20,6 +21,7 @@ import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;
@ -41,7 +43,7 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
}
@Transactional(rollbackFor = Exception.class)
public void handler(List<JhxfExcel> objList) {
public void handler(List<JhxfExcel> objList, HttpServletRequest request) {
List<YdjhImport> ydjhImports = this.executeYdjhImport(objList);
ydjhImports.forEach(item->{
@ -79,6 +81,8 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
ydjhImports.forEach(importService::saveOrUpdate);
//没有基础数据的计划生成图纸计划
String yhms= (String) request.getAttribute("yhms");
String date= DateUtil.date().toString("yyyy/MM/dd");
List<PgdTzjh> tzjhList = new ArrayList<>();
ydjhImports.stream()
.filter(item -> !StrUtil.equals(item.getExtData(), "1"))
@ -96,6 +100,8 @@ public class YdjhImportService extends ServiceImpl<DmSygdMxMapper, DmSygdMx> {
String[] dcfd=item.getDcFd().split("\\.");
for(String dcFd:dcfd){
PgdTzjh dmTzjh = PgdTzjh.of(item,dcPl, dcFd);
dmTzjh.setBzry(yhms);
dmTzjh.setBzrq(date);
tzjhList.add(dmTzjh);
}
}

@ -931,7 +931,7 @@ where dc_ch=#{dcch} and dc_pl =#{dcpl}
</if>
from
dm_ydjh
where zt>=11
where zt>=11 and zt>=#{zt}
<if test="wgzt=='62'">
and isnull(qgfkrq,'')=''
</if>

Loading…
Cancel
Save