Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | @Operation(summary = "计算气体管路产能负载统计", description = "计算") |
| | | |
| | | @PostMapping("/computeCapacity") |
| | | public void computeCapacity() |
| | | public AjaxResult computeCapacity() |
| | | { |
| | | apsGasPipingRouteStatService.computeCapacity(); |
| | | try { |
| | | apsGasPipingRouteStatService.saveGasPipingRoutStateList(); |
| | | return AjaxResult.success(); |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage()); |
| | | return AjaxResult.error("更新失败!"); |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "获取气体管路产能负载统计", description = "计算") |
| | |
| | | } |
| | | // 批量插入以提高性能 |
| | | if (!cptStateList.isEmpty()) { |
| | | int batchSize = 500; |
| | | int batchSize = 1000; |
| | | int size = cptStateList.size(); |
| | | for (int i = 0; i < size; i += batchSize) { |
| | | int end = Math.min(i + batchSize, size); |
| | |
| | | id,work_order_no, road_process_number, current_process_number, production_quantity, standard_time, |
| | | process_total_time, process_plan_start_day, design_times, del_flag, create_by, process_name, |
| | | create_time, item_number, standard_dosage, process_total_dosage, design_capacity, major, |
| | | plan_start_year, plan_start_month, plan_start_day,batch_number,process_plan_end_day,warning |
| | | plan_start_year, plan_start_month, plan_start_day,batch_number,process_plan_end_day,warning,order_plan_end_day |
| | | ) |
| | | VALUES |
| | | <foreach collection="apsGasPipingRouteStatList" item="stat" separator=","> |
| | |
| | | #{stat.standardTime}, #{stat.processTotalTime}, #{stat.processPlanStartDay}, #{stat.designTimes}, #{stat.delFlag}, |
| | | #{stat.createBy}, #{stat.processName}, #{stat.createTime}, #{stat.itemNumber}, #{stat.standardDosage}, |
| | | #{stat.processTotalDosage}, #{stat.designCapacity}, #{stat.major}, #{stat.planStartYear}, |
| | | #{stat.planStartMonth}, #{stat.planStartDay}, #{stat.batchNumber}, #{stat.processPlanEndDay},#{stat.warning} |
| | | #{stat.planStartMonth}, #{stat.planStartDay}, #{stat.batchNumber}, #{stat.processPlanEndDay},#{stat.warning},#{stat.orderPlanEndDay} |
| | | ) |
| | | </foreach> |
| | | |
| | |
| | | cast(pl.process_number as numeric(18, 2)) as current_process_number, |
| | | pl.production_quantity, |
| | | rt.standard_time, |
| | | (rt.standard_time * pl.production_quantity) as process_total_time, |
| | | cast( (rt.standard_time * pl.production_quantity) as numeric(18, 4) ) as process_total_time, |
| | | rt.process_plan_start_day, |
| | | rt.process_plan_end_day, |
| | | pl.plan_end_day as order_plan_end_day, |
| | |
| | | false as warning |
| | | from aps_gas_piping_plan as pl |
| | | left join aps_process_route as rt on pl.document_number = rt.work_order_no |
| | | where pl.document_number is not null and rt.work_order_no is not null |
| | | where pl.document_number is not null and rt.work_order_no is not null and pl.plan_end_day is not null |
| | | order by rt.work_order_no asc, rt.process_number desc |
| | | </select> |
| | | |
| | |
| | | pl.plan_end_day as order_plan_end_day |
| | | from aps_plate_plan as pl |
| | | left join aps_process_route as rt on pl.document_number = rt.work_order_no |
| | | where pl.document_number is not null and rt.work_order_no is not null |
| | | where pl.document_number is not null and rt.work_order_no is not null and pl.plan_end_day is not null |
| | | order by rt.work_order_no asc, rt.process_number desc |
| | | </select> |
| | | <update id="removeOtherStat" parameterType="String"> |