|
|
@ -5,6 +5,9 @@ import cn.hutool.core.util.ObjUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
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.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
@ -53,10 +56,29 @@ public class ZyjhController {
|
|
|
|
* 抛丸导入
|
|
|
|
* 抛丸导入
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("pwdr")
|
|
|
|
@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();
|
|
|
|
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();
|
|
|
|
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<>();
|
|
|
|
return new ResultBean<>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|