guoyuji
2024-04-24 387e98df63a7fbcea59773c5cf03000efedb68a5
报工相关程序
4个文件已修改
94 ■■■■ 已修改文件
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/application.yml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/ReportingWork.xml 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/erp-0.0.1-SNAPSHOT.jar.original 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -310,7 +310,10 @@
    </select>
    <select id="selectGlassProcessNum" resultType="java.lang.Integer">
        select
              d.reporting_work_num-b.reporting_work_num-b.broken_num+ifnull(c.patchNumSum,0)
        if((d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)&lt; 0,
           0,
           (d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)
            )
        from flow_card as a
        left join sd.order_process_detail as b
        on
@@ -321,13 +324,22 @@
            and b.process_id = a.process_id
        left join sd.order_process_detail as d
            on d.id=b.id-1
        left join (select sum(patch_num) as patchNumSum,order_sort,technology_number,process_id
                   from patch_log
                   group by reporting_work_id,order_sort,technology_number) as c
        on
            c.process_id = a.process_id
            and c.order_sort = a.order_number
            and c.technology_number = a.technology_number
        left join (SELECT
                       sum(rw.rework_num) as 'reworkNumSum',
                       rw.process_id,rw.order_sort,rw.technology_number,
                       rwk.this_process
                   from
                       rework as rw
                           LEFT JOIN
                       reporting_work as rwk
                       on rw.reporting_work_id =rwk.reporting_work_id
                   where rwk.this_process=#{thisProcess}
                     and rw.review_status=1
                     and rw.process_id = SUBSTR(#{processId} from 1 for 14)
                   GROUP BY rw.process_id,rw.order_sort,rw.technology_number) as c
                  on c.process_id = a.process_id
                      and c.order_sort = a.order_number
                      and c.technology_number = a.technology_number
        where
            a.process_id=SUBSTR(#{processId} from 1 for 14)
north-glass-erp/target/classes/application.yml
@@ -0,0 +1,35 @@
server:
  port: 8086
spring:
  datasource:
    dynamic:
      primary: user_info #设置默认的数据源或者数据源组,默认值即为master
      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
      datasource:
        user_info:
          url: jdbc:mysql://localhost:3306/erp_user_info?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        sd:
          url: jdbc:mysql://localhost:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        mm:
          url: jdbc:mysql://localhost:3306/mm?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        pp:
          url: jdbc:mysql://localhost:3306/pp?serverTimezone=GMT%2b8
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
#mybatis-plus:
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
north-glass-erp/target/classes/mapper/pp/ReportingWork.xml
@@ -310,7 +310,13 @@
    </select>
    <select id="selectGlassProcessNum" resultType="java.lang.Integer">
        select
              d.reporting_work_num-b.reporting_work_num-b.broken_num+ifnull(c.patchNumSum,0)
            if((d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)&lt; 0,
               0,
               (d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)
                )
        from flow_card as a
        left join sd.order_process_detail as b
        on
@@ -321,13 +327,22 @@
            and b.process_id = a.process_id
        left join sd.order_process_detail as d
            on d.id=b.id-1
        left join (select sum(patch_num) as patchNumSum,order_sort,technology_number,process_id
                   from patch_log
                   group by reporting_work_id,order_sort,technology_number) as c
        on
            c.process_id = a.process_id
            and c.order_sort = a.order_number
            and c.technology_number = a.technology_number
        left join (SELECT
                       sum(rw.rework_num) as 'reworkNumSum',
                       rw.process_id,rw.order_sort,rw.technology_number,
                       rwk.this_process
                   from
                       rework as rw
                           LEFT JOIN
                       reporting_work as rwk
                       on rw.reporting_work_id =rwk.reporting_work_id
                   where rwk.this_process=#{thisProcess}
                     and rw.review_status=1
                     and rw.process_id = SUBSTR(#{processId} from 1 for 14)
                   GROUP BY rw.process_id,rw.order_sort,rw.technology_number) as c
                  on c.process_id = a.process_id
                      and c.order_sort = a.order_number
                      and c.technology_number = a.technology_number
        where
            a.process_id=SUBSTR(#{processId} from 1 for 14)
north-glass-erp/target/erp-0.0.1-SNAPSHOT.jar.original
Binary files differ