Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| | |
| | | {field: 'technology_number', width: 90,title: t('processCard.technologyNumber'),showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'child_width', width: 90,title: t('order.width'),showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'child_height', width: 90,title: t('order.height'),showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity', width: 90,title: t('order.quantity')}, |
| | | {field: 'quantity',slots: { default: 'show'}, width: 90,title: t('order.quantity')}, |
| | | {field: 'glassQuantity', width: 90,title: t('order.glassQuantity')}, |
| | | {field: 'gross_area', width: 90,title: t('order.area')}, |
| | | {field: 'shippedQuantity',width: 120, title: t('delivery.deliveryQuantity')}, |
| | | {field: 'inventory',width: 120, title: t('productStock.inventoryQuantity')}, |
| | | {field: 'inventoryArea',width: 120, title: t('report.inventoryArea')}, |
| | | {field: 'grossArea',slots: { default: 'show'}, width: 90,title: t('order.area')}, |
| | | {field: 'shippedQuantity',slots: { default: 'show'},width: 120, title: t('delivery.deliveryQuantity')}, |
| | | {field: 'inventory',slots: { default: 'show'},width: 120, title: t('productStock.inventoryQuantity')}, |
| | | {field: 'inventoryArea',slots: { default: 'show'},width: 120, title: t('report.inventoryArea')}, |
| | | {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')}, |
| | | ] |
| | | let column = [0,1,3,8,10,11,12,13] |
| | |
| | | xGrid.value.updateFooter() |
| | | const lastProcess = title.value[title.value.length-1].process |
| | | const filter = data.value.filter(item => { |
| | | const lastFinish = parseInt(item['reportWorkQuantity'][lastProcess]) |
| | | const lastFinish = parseInt(item['reportWorkQuantityShow'][lastProcess]) |
| | | const allFinish = item.glassQuantity*1 |
| | | return allFinish>lastFinish |
| | | }) |
| | |
| | | } |
| | | } |
| | | const footSum =(list, field) => { |
| | | console.log(list) |
| | | return |
| | | if(xGrid.value.isFilter() || orderType.value!==1){ |
| | | return |
| | | } |
| | |
| | | count += Number(item[field]) || 0 |
| | | } |
| | | }) |
| | | return count.toFixed(2) |
| | | return count.toFixed(2).replace(/\.?0+$/, ''); |
| | | } |
| | | |
| | | const quantitySum = ( row,column )=>{ |
| | |
| | | +'(' |
| | | +reportWorkQuantityCount |
| | | +')' ) |
| | | //return |
| | | } |
| | | //切换模式单片显示 |
| | | const show = (row,column ) =>{ |
| | | return row[column.field+'Show'] |
| | | } |
| | | |
| | | let showTitle = ref(false) |
| | | const changeZoom = ()=> { |
| | | showTitle.value = !showTitle.value |
| | |
| | | <span>{{ quantitySum(row,column) }} </span> |
| | | </template> |
| | | |
| | | <template #show="{ row,column }"> |
| | | <span>{{ show(row,column) }} </span> |
| | | </template> |
| | | |
| | | <template #title> |
| | | <span style="font-weight: bold" v-show="showTitle"> |
| | | {{ row.orderId }} |
| | |
| | | } |
| | | }; |
| | | |
| | | console.log(receivedData) |
| | | |
| | | const handleFetchData = async (projectNumber) => { |
| | | try { |
| | | const res = await request.post(`/glassOptimize/selectProjectCompute/${projectNumber}`); |
| | |
| | | if (storedData) {
|
| | | try {
|
| | | inventoryData.value = JSON.parse(storedData);
|
| | | console.log('从 localStorage 读取到库存数据:', inventoryData.value);
|
| | | console.log('取玻璃厚度',inventoryData.value[0].thickness);
|
| | | } catch (e) {
|
| | | console.error('解析库存数据失败:', e);
|
| | | }
|
| | |
| | | .then((res) => {
|
| | | if ((res.code === 200 || res.code === '200') && res.data && res.data.data && res.data.data.length > 0) {
|
| | | try {
|
| | | console.log("原始数据:", res.data.data[0]); // 调试信息
|
| | |
|
| | | // 解析保存的布局数据
|
| | | const parsedData = JSON.parse(res.data.data[0].Layouts);
|
| | | console.log("解析后的数据:", parsedData); // 调试信息
|
| | |
| | | {field: 'thickness', width: 50, title: '厚度',}, |
| | | {field: 'type', width: 50, title: '类型',}, |
| | | {field: 'state', width: 50, title: '状态',}, |
| | | {field: 'temperingState', width: 50, title: '钢化状态',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'optimizeState', width: 50, title: '优化状态',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'temperingState', width: 50, title: '钢化模拟',filters: [{data: ''}], slots: {filter: 'num1_filter'}, |
| | | filterMethod:filterChanged, formatter: ({ cellValue }) => cellValue === 1 ? '是' : (cellValue === 0 ? '否' : cellValue)}, |
| | | {field: 'optimizeState', width: 50, title: '优化计算',filters: [{data: ''}], slots: {filter: 'num1_filter'}, |
| | | filterMethod:filterChanged,formatter: ({ cellValue }) => cellValue === 1 ? '是' : (cellValue === 0 ? '否' : cellValue)}, |
| | | {field: 'quantity', width: 50, title: '数量',}, |
| | | {field: 'area', width: 50, title: '面积',}, |
| | | {field: 'processCardQuantity', width: 100, title: '流程卡数量',}, |
| | |
| | | return Result.seccess(glassOptimizeService.getProcessCardMpThirdParty(projectNo)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("mes工程任务下发接口") |
| | | @PostMapping("/getIssuingProjects") |
| | | public Result issuingProjects(@RequestBody String projectNo) throws JsonProcessingException { |
| | | return Result.seccess(glassOptimizeService.issuingProjects(projectNo)); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.sd.DeliveryService; |
| | | import com.example.erp.tools.DownExcel; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @ApiOperation("发货订单查询接口") |
| | | @SaCheckPermission("selectDelivery.search") |
| | | @PostMapping("/getSelectShippingOrder/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Delivery delivery){ |
| | | public Result getSelectShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Delivery delivery) throws JsonProcessingException { |
| | | return Result.seccess(deliveryService.getSelectShippingOrder(pageNum,pageSize,selectDate,delivery)); |
| | | } |
| | | |
| | |
| | | |
| | | return Result.seccess(deliveryService.updateDeliveryPrintNumber(deliveryId)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | List<Map<String, Object>> getProjectByProjectNoSv(String projectNo); |
| | | |
| | | void updateFlowCardRack(String processId, String technologyNumber, int rackValue); |
| | | |
| | | Map<String,Object> selectOptimizeProject(String projectNo); |
| | | |
| | | List<Map<String,Object>> selectOptimizeLayout(String projectNo); |
| | | |
| | | List<Map<String,Object>> selectOptimizeDetail(String projectNo); |
| | | |
| | | List<Map<String,Object>> selectFlowCardInfoList(String projectNo); |
| | | } |
| | |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.pp.GlassOptimizeMapper; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | public Boolean issuingProjects(String projectNo) throws JsonProcessingException { |
| | | boolean saveState=false; |
| | | try { |
| | | // 1. 创建URL对象 |
| | | URL url = new URL("http://localhost:88/api/loadGlass/engineering/importEngineer"); |
| | | |
| | | // 2. 打开连接 |
| | | HttpURLConnection conn = (HttpURLConnection) url.openConnection(); |
| | | conn.setRequestMethod("POST"); |
| | | conn.setRequestProperty("Content-Type", "application/json"); |
| | | conn.setRequestProperty("Accept", "application/json"); |
| | | conn.setDoOutput(true); |
| | | |
| | | // 3. 准备请求体 |
| | | Map<String, Object> optimizeProject=glassOptimizeMapper.selectOptimizeProject(projectNo); |
| | | optimizeProject.put("engineeringRawQueueList", glassOptimizeMapper.selectOptimizeLayout(projectNo)); |
| | | optimizeProject.put("glassInfolList", glassOptimizeMapper.selectOptimizeDetail(projectNo)); |
| | | optimizeProject.put("flowCardInfoList", glassOptimizeMapper.selectFlowCardInfoList(projectNo)); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | mapper.registerModule(new JavaTimeModule()); |
| | | String jsonInputString = mapper.writeValueAsString(optimizeProject); |
| | | |
| | | //发送请求 |
| | | try(OutputStream os = conn.getOutputStream()) { |
| | | byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); |
| | | os.write(input, 0, input.length); |
| | | } |
| | | |
| | | // 获取响应 |
| | | try(BufferedReader br = new BufferedReader( |
| | | new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8))) { |
| | | StringBuilder response = new StringBuilder(); |
| | | String responseLine; |
| | | while ((responseLine = br.readLine()) != null) { |
| | | response.append(responseLine.trim()); |
| | | } |
| | | System.out.println("Response: " + response.toString()); |
| | | JSONObject obj = JSONObject.parseObject(response.toString()); |
| | | if(obj.get("code").equals(200)&&obj.get("data").equals(true)){ |
| | | saveState=true; |
| | | } |
| | | |
| | | } |
| | | |
| | | //关闭连接 |
| | | conn.disconnect(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | saveState= false; |
| | | } |
| | | return saveState; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | //上工序报工班组 |
| | | private void mergeTeamsGroupsName( List<WorkInProgressDTO> dataList1,List<WorkInProgressDTO> dataList2) { |
| | | |
| | | for (WorkInProgressDTO dto1 : dataList1) { |
| | | //根据当前工序获取 是否为单片、夹胶、或者全部 |
| | | BasicData basicData = basicDataMapper. |
| | |
| | | |
| | | |
| | | //获取表头工序筛选数据 |
| | | List<Map<String, String>> processFilterList = orderProcessDetailMapper.filterOrderProcess(orderId); |
| | | List<Map<String, String>> processList = processFilterList; |
| | | List<Map<String, String>> uniqueList = orderProcessDetailMapper.filterOrderProcess(orderId); |
| | | |
| | | List<String> filterList = new ArrayList<>(); |
| | | //循环遍历数组,判断此序号当前的工序 |
| | | for (int i = 1; i < processFilterList.size(); i++) { |
| | | filterList.add(processFilterList.get(i).get("process")); |
| | | List<Map<String, String>> lastProcessList = |
| | | orderProcessDetailMapper.filterLastProcess( |
| | | orderId, |
| | | String.valueOf(processFilterList.get(i).get("order_number")), |
| | | String.valueOf(processFilterList.get(i).get("technology_number")), |
| | | String.valueOf(processFilterList.get(i).get("id")) |
| | | ); |
| | | if (!lastProcessList.isEmpty()) { |
| | | int finalI = i; |
| | | lastProcessList.forEach(lastProcess -> { |
| | | if (filterList.contains(lastProcess.get("process"))) { |
| | | processList.add(lastProcess); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | // 使用HashSet来记录已经遇到的value值 |
| | | Set<String> seenValues = new HashSet<>(); |
| | | // 创建一个新的List来存储结果 |
| | | List<Map<String, String>> uniqueList = new ArrayList<>(); |
| | | |
| | | // 反向遍历原始List |
| | | for (int i = processList.size() - 1; i >= 0; i--) { |
| | | Map<String, String> maps = processList.get(i); |
| | | String value = maps.values().iterator().next(); // 假设每个Map只有一个value |
| | | |
| | | // 如果value还没有被看到过,就添加到结果List和HashSet中 |
| | | if (!seenValues.contains(value)) { |
| | | uniqueList.add(0, maps); // 添加到结果List的开头,以保持原顺序 |
| | | seenValues.add(value); |
| | | } |
| | | } |
| | | map.put("title", uniqueList); |
| | | Map<String,Integer> clos = new HashMap<>(); |
| | | for (int i=0;i<uniqueList.size();i++){ |
| | |
| | | Map<String, String> data = JSON.parseObject(dataList.get(i).get("reportWorkQuantity"), |
| | | new TypeReference<Map<String, String>>() { |
| | | }); |
| | | |
| | | Integer max = orderGlassDetailMapper |
| | | .getMaxTechnologyNumberByGroup(dataList.get(i).get("order_id"), |
| | | String.valueOf(dataList.get(i).get("order_number")), |
| | | String.valueOf(dataList.get(i).get("group")) |
| | | ); |
| | | Integer min = orderGlassDetailMapper |
| | | .getMinTechnologyNumberByGroup(dataList.get(i).get("order_id"), |
| | | String.valueOf(dataList.get(i).get("order_number")), |
| | | String.valueOf(dataList.get(i).get("group")) |
| | | ); |
| | | for (String key : clos.keySet()) { |
| | | if(data.get(key) != null){ |
| | | Integer max = orderGlassDetailMapper |
| | | .getMaxTechnologyNumberByGroup(dataList.get(i).get("order_id"), |
| | | String.valueOf(dataList.get(i).get("order_number")), |
| | | String.valueOf(dataList.get(i).get("group")) |
| | | ); |
| | | Integer min = orderGlassDetailMapper |
| | | .getMinTechnologyNumberByGroup(dataList.get(i).get("order_id"), |
| | | String.valueOf(dataList.get(i).get("order_number")), |
| | | String.valueOf(dataList.get(i).get("group")) |
| | | ); |
| | | |
| | | if(min == Integer.parseInt(String.valueOf(dataList.get(i).get("technology_number"))) ){ |
| | | Map<String, Integer> getRow = new HashMap<>(); |
| | | // { row: 0, col: 1, rowspan: 3, colspan: 0}, |
| | |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.BasicDataProduce; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.InputStreamReader; |
| | | import java.io.OutputStream; |
| | | import java.lang.reflect.Field; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | |
| | | FinishedGoodsInventoryService finishedGoodsInventoryService; |
| | | |
| | | |
| | | public Map<String, Object> getSelectShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Delivery delivery) { |
| | | public Map<String, Object> getSelectShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Delivery delivery) throws JsonProcessingException { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | |
| | | |
| | | return oddNumbers; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <select id="getSelectMaterialInventoryMes"> |
| | | select |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | sum(mi.available_quantity) AS quantity, |
| | | JSON_UNQUOTE(JSON_EXTRACT(ms.json, '$.width')) AS width, |
| | | JSON_UNQUOTE(JSON_EXTRACT(ms.json, '$.height')) AS height, |
| | |
| | | </delete> |
| | | |
| | | |
| | | <select id="selectOptimizeProject"> |
| | | select |
| | | project_no as engineerId, |
| | | project_name as engineerName, |
| | | avg_cut_pct as avgAvailability, |
| | | valid_cut_pct as validAvailability, |
| | | last_cut_pct as lastAvailability, |
| | | glass_total as glassTotal, |
| | | glass_total_area as glassTotalArea, |
| | | raw_stock_qty as planPatternTotal, |
| | | raw_stock_area as planPatternTotalArea, |
| | | glass_thickness as thickness, |
| | | glass_type as filmsId |
| | | from |
| | | pp.optimize_project |
| | | where |
| | | project_no = #{projectNo} |
| | | </select> |
| | | |
| | | <select id="selectOptimizeLayout"> |
| | | select |
| | | ol.project_no as engineeringId, |
| | | op.glass_type as filmsId, |
| | | ol.realwidth as rawGlassWidth, |
| | | ol.realheight as rawGlassHeight, |
| | | op.glass_thickness as rawGlassThickness, |
| | | ol.stock_id rawSequence |
| | | from |
| | | pp.optimize_layout ol |
| | | left join pp.optimize_project op on ol.project_no = op.project_no |
| | | where |
| | | ol.project_no = #{projectNo} |
| | | order by |
| | | ol.stock_id |
| | | </select> |
| | | |
| | | |
| | | <select id="selectOptimizeDetail"> |
| | | select |
| | | opd.glass_id as glassId, |
| | | opd.project_no as engineerId, |
| | | opd.process_id as flowCardId, |
| | | opd.order_sort as orderNumber, |
| | | opd.o_width as width, |
| | | opd.o_height as height, |
| | | op.glass_thickness as thickness, |
| | | op.glass_type as filmsId, |
| | | opd.total_layer as totalLayer, |
| | | opd.layer, |
| | | opd.stock_id as rawSequence, |
| | | opd.p_width as edgWidth, |
| | | opd.p_height as edgHeight, |
| | | opd.x_axis as xAxis, |
| | | opd.y_axis as yAxis, |
| | | if(opd.o_width!=opd.width,1,0) as rawAngle, |
| | | opd.heat_layout_id as temperingLayoutId, |
| | | opd.heat_layout_sort as temperingFeedSequence, |
| | | ohd.x_axis as xCoordinate, |
| | | ohd.y_axis as yCoordinate, |
| | | ohd.rotate_angle as angle, |
| | | IF(LOCATE('中空', ogd.process ) > 0 or LOCATE('夹层', ogd.process ) > 0, 1, 0) as isMultiple, |
| | | od.width as maxWidth, |
| | | od.height as maxHeight, |
| | | opd.mark_icon as markIcon, |
| | | fc.`merge` as combine, |
| | | concat( opd.process_id, '/', opd.layer ) as flowCardSequence, |
| | | ogd.process |
| | | from |
| | | pp.optimize_detail opd |
| | | left join pp.optimize_project op on op.project_no = opd.project_no |
| | | left join pp.flow_card fc on opd.process_id = fc.process_id |
| | | and opd.layer = fc.technology_number |
| | | and opd.order_sort = order_number |
| | | left join sd.`order` o on fc.order_id = o.order_id |
| | | left join sd.order_detail od on fc.order_id = od.order_id |
| | | and fc.order_number = od.order_number |
| | | left join sd.order_glass_detail ogd on fc.order_id = ogd.order_id |
| | | and fc.order_number = ogd.order_number |
| | | and ogd.technology_number = fc.technology_number |
| | | left join pp.optimize_heat_detail ohd on ohd.layout_id = opd.heat_layout_id |
| | | and ohd.sort = opd.heat_layout_sort and ohd.project_no=opd.project_no |
| | | where |
| | | opd.project_no = #{projectNo} |
| | | </select> |
| | | |
| | | <select id="selectFlowCardInfoList"> |
| | | select |
| | | fc.process_id as flowCardId, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | REPLACE (JSON_UNQUOTE( JSON_EXTRACT( pd.separation, '$.thickness' )), 'mm', '' ) as thickness, |
| | | JSON_UNQUOTE(JSON_EXTRACT( pd.separation, '$.color' )) as filmsId, |
| | | fc.layers_number as totalLayer, |
| | | fc.technology_number as layer, |
| | | fc.quantity as glassTotal, |
| | | od.order_number as orderNumber, |
| | | od.product_name as productName, |
| | | o.customer_name as customerName |
| | | from |
| | | pp.flow_card fc |
| | | left join sd.`order` o on fc.order_id = o.order_id |
| | | left join sd.order_detail od on fc.order_id = od.order_id |
| | | and fc.order_number = od.order_number |
| | | left join sd.order_glass_detail ogd on fc.order_id = ogd.order_id |
| | | and fc.order_number = ogd.order_number |
| | | and ogd.technology_number = fc.technology_number |
| | | left join sd.product p on od.product_id = p.id |
| | | left join sd.product_detail pd on od.product_id = pd.prod_id |
| | | and fc.technology_number = pd.glass_sort |
| | | where |
| | | project_no =#{projectNo} |
| | | </select> |
| | | |
| | | |
| | | |
| | |
| | | b.child_width, |
| | | b.child_height, |
| | | if(c.technology_number=1,c.quantity,0) as quantity, |
| | | # c.quantity, |
| | | |
| | | c.quantity as thisQuantity,/*用于判断是否改变颜色*/ |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityShow, |
| | |
| | | e.broken_num, |
| | | c.quantity as glassQuantity, |
| | | |
| | | # c.quantity*a.area as gross_area, |
| | | # ifnull(f.inventory, 0) as inventory, |
| | | # round(ifnull(f.inventory, 0) * a.area, 2) as inventoryArea, |
| | | # ifnull(dd.quantity, 0) as shippedQuantity, |
| | | c.quantity as quantityShow, |
| | | c.quantity*a.area as grossAreaShow, |
| | | ifnull(f.inventory, 0) as inventoryShow, |
| | | round(ifnull(f.inventory, 0) * a.area, 2) as inventoryAreaShow, |
| | | ifnull(dd.quantity, 0) as shippedQuantityShow, |
| | | |
| | | if(c.technology_number=1,c.quantity*a.area,0) as gross_area, |
| | | if(c.technology_number=1,c.quantity*a.area,0) as grossArea, |
| | | if(c.technology_number=1,ifnull(f.inventory, 0) ,0) as inventory, |
| | | if(c.technology_number=1,round(ifnull(f.inventory, 0) * a.area, 2),0) as inventoryArea, |
| | | if(c.technology_number=1,ifnull(dd.quantity, 0) ,0) as shippedQuantity, |
| | |
| | | technology_number, |
| | | sum(a.broken_num) as broken_num, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", if(technology_number!=1 and (bd.nickname is not null and bd.nickname !='') ,0,reporting_work_num), "\"")), |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", if(technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")), |
| | | '}' |
| | | ) as reportWorkQuantity, |
| | | concat('{', |
| | |
| | | where delivery_id = #{deliveryId} |
| | | |
| | | </update> |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!--查询筛选后唯一的流程卡号--> |
| | | <select id="filterOrderProcess"> |
| | | select id,process,order_number,technology_number |
| | | select * from( select max(id) as id,process,order_number,technology_number,b.nickname, |
| | | case b.nickname when '' then 1 |
| | | when null then 1 |
| | | when 'stepC' then 2 |
| | | when 'stepA' then 3 |
| | | when 'stepD' then 4 |
| | | when 'stepB' then 4 |
| | | end as sort |
| | | |
| | | from order_process_detail |
| | | left join (select DISTINCT basic_name,nickname from basic_data where basic_category = 'process') as b |
| | | on b.basic_name = process |
| | | where order_id = #{orderId} |
| | | group by process |
| | | order by id |
| | | group by process) as a |
| | | order by sort,id |
| | | |
| | | </select> |
| | | |