1.抛丸反馈增加excle导入方式反馈功能

2.增加物料号和内码导出功能
master
董哲奇 5 months ago
parent 855a58b58b
commit e4b6c077fa

@ -14,14 +14,13 @@ public class PwExcel {
@ExcelProperty(value = "批量")
public String dcPl;
@ExcelProperty(value = "分段")
@ExcelProperty(value = "分段",index = 5)
public String dcFd;
@ExcelProperty(value = "套料图")
@ExcelProperty(value = "套料图")
public String tlth;
@ExcelProperty(value = "备注")
public String bz;
public int dataOrder;
}

@ -30,7 +30,9 @@ public class YcldwInfo {
private String tlth;
private String wph;
private String wlh;
private String wpgg;
private String nm;//内码
private String sljhrq;
private String qgjhrq;
private String bfr;//摆放人

@ -5,6 +5,9 @@ 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.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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,10 +56,29 @@ public class ZyjhController {
*
*/
@PostMapping("pwdr")
public ResultBean<?> pwdr(MultipartFile file) throws IOException {
@AuthFunction
public ResultBean<?> pwdr(MultipartFile file,HttpServletRequest request) throws IOException {
String yhdm= (String) request.getAttribute("yhdm");
String date=DateUtil.date().toString("yyyy/MM/dd HH:mm:ss");
ExcelPwListener excelPwListener = new ExcelPwListener();
EasyExcel.read(file.getInputStream(), GdxqExcel.class, excelPwListener).sheet(0).headRowNumber(1).doRead();
EasyExcel.read(file.getInputStream(), PwExcel.class, excelPwListener).sheet(0).headRowNumber(1).doRead();
List<PwExcel> objList = excelPwListener.getObjectList();
objList.forEach(item-> {
zyjhService.update(Wrappers.<DmYdjh>lambdaUpdate()
.set(DmYdjh::getPwfkrq,date).set(DmYdjh::getPwfkry,yhdm)
.eq(DmYdjh::getDcCh, item.getDcCh())
.eq(DmYdjh::getDcPl, item.getDcPl())
.eq(DmYdjh::getDcFd, item.getDcFd())
.eq(DmYdjh::getTzbh, item.getTlth()));
ycldwInfoService.remove(Wrappers.<YcldwInfo>lambdaQuery()
.eq(YcldwInfo::getCzbh, item.getDcCh())
.eq(YcldwInfo::getPl, item.getDcPl())
.eq(YcldwInfo::getFd, item.getDcFd())
.eq(YcldwInfo::getTlth, item.getTlth())
);
});
return new ResultBean<>();
}

@ -26,7 +26,9 @@ public class ShangLiao {
private String zl;
private String tlth;
private String wph;
private String wlh;
private String wpgg;
private String nm;//内码
private String sljhrq;
private String qgjhrq;
private String bfr;//摆放人

Loading…
Cancel
Save