-
admin
2024-04-29 2c7661d0bca739a9b403cdd420d2b91eb77470e6
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -2,6 +2,8 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -33,6 +35,31 @@
{
    @Autowired
    private IBsFormulaChildInfoService bsFormulaChildInfoService;
    /**
     * 查询配方配置子信息列表
     */
    @GetMapping("/noPageListFormulaChild")
    public TableDataInfo noPageListFormulaChild(BsFormulaChildInfo bsFormulaChildInfo)
    {
        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
                .eq(BsFormulaChildInfo::getProductCode,bsFormulaChildInfo.getProductCode())
                .eq(BsFormulaChildInfo::getProcessesCode,bsFormulaChildInfo.getProcessesCode()));
        for (BsFormulaChildInfo formulaChildInfo : list) {
//            formulaChildInfo.setSort(formulaChildInfo.getStepSort());
//            formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement());
//            formulaChildInfo.setImg(formulaChildInfo.getOperationSteps());
            if(formulaChildInfo.getCollectData()!=null&& !"".equals(formulaChildInfo.getCollectData())){
                if(formulaChildInfo.getCollectData().contains("[")){
                    String data = formulaChildInfo.getCollectData();
                    data = data.replace("[", "").replace("]", "").replace(" ", "");
                    String[] tightenDataParts = data.split(",");
                    formulaChildInfo.setCollectData("扭矩"+tightenDataParts[0]+"角度"+tightenDataParts[1]+"扭矩结果"+tightenDataParts[2]+"角度结果"+tightenDataParts[3]);
                }
            }
        }
        return getDataTable(list);
    }
    /**
     * 查询配方配置子信息列表
@@ -79,6 +106,15 @@
    }
    /**
     * 扫码确认
     */
    @GetMapping("/yzUpdateResults")
    public AjaxResult yzUpdateResults(BsFormulaChildInfo bsFormulaChildInfo)
    {
        return bsFormulaChildInfoService.yzUpdateResults(bsFormulaChildInfo);
    }
    /**
     * 放行请空状态
     */
    @GetMapping("/workpieceRelease")
@@ -97,6 +133,15 @@
    }
    /**
     * 拧紧后更新对应数据
     */
    @GetMapping("/yzUpdateTighteningFormula")
    public AjaxResult yzUpdateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo)
    {
        return bsFormulaChildInfoService.yzUpdateTighteningFormula(bsFormulaChildInfo);
    }
    /**
     * 导出配方配置子信息列表
     */
    @PreAuthorize("@ss.hasPermi('bs:formulaChild:export')")