|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.dsic.gj_erp.controller.jcsj;
|
|
|
|
package com.dsic.gj_erp.controller.jcsj;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
@ -12,6 +13,7 @@ import com.dsic.gj_erp.mapper.jcsj.DmBomMapper;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmBomService;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmBomService;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmTltpdfService;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.DmTltpdfService;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.impl.BomUploadServiceImpl;
|
|
|
|
import com.dsic.gj_erp.service.jcsj.impl.BomUploadServiceImpl;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
|
|
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
|
|
|
import org.apache.pdfbox.text.PDFTextStripper;
|
|
|
|
import org.apache.pdfbox.text.PDFTextStripper;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@ -34,6 +36,7 @@ import java.util.List;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/bom")
|
|
|
|
@RequestMapping("/bom")
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
public class BomUploadController {
|
|
|
|
public class BomUploadController {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
BomUploadServiceImpl bomUploadService;
|
|
|
|
BomUploadServiceImpl bomUploadService;
|
|
|
@ -137,9 +140,16 @@ public class BomUploadController {
|
|
|
|
// System.out.println(a[j]);
|
|
|
|
// System.out.println(a[j]);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
if (i==1)continue;
|
|
|
|
if (i==1)continue;
|
|
|
|
String tlth1[]=s.split("DNV\\+CCS")[1].split("\r\n");
|
|
|
|
// Double ljzl=0.0;
|
|
|
|
Double ljzl=new Double(tlth1[1]);
|
|
|
|
// try {
|
|
|
|
if (ljzl==0.0)continue;
|
|
|
|
// String tlth1[]=s.split("DNV\\+CCS")[1].split("\r\n");
|
|
|
|
|
|
|
|
// ljzl=new Double(tlth1[1]);
|
|
|
|
|
|
|
|
// }catch (Exception e){
|
|
|
|
|
|
|
|
// String logMsg= StrUtil.format("数控套料图pdf读取错误--图号:{},页数:{}",th,i);
|
|
|
|
|
|
|
|
// log.error(logMsg);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (ljzl==0.0)continue;
|
|
|
|
//根据当前页数据,修改BOM中零件属性 坡口 打磨 曲
|
|
|
|
//根据当前页数据,修改BOM中零件属性 坡口 打磨 曲
|
|
|
|
int ljCount= s.split("\\|")[0].split("\r\n").length;//零件数量
|
|
|
|
int ljCount= s.split("\\|")[0].split("\r\n").length;//零件数量
|
|
|
|
if (ljCount==11||ljCount==21||ljCount==31){
|
|
|
|
if (ljCount==11||ljCount==21||ljCount==31){
|
|
|
|