Jelajahi Sumber

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper into master

seyason 1 tahun lalu
induk
melakukan
84c67b50aa

+ 7 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/Plan.java

@@ -22,7 +22,7 @@ import org.springframework.format.annotation.DateTimeFormat;
  * </p>
  *
  * @author Seyason
- * @since 2023-11-27
+ * @since 2024-01-11
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -247,6 +247,12 @@ public class Plan extends Model<Plan> {
     @TableField("is_delete")
     private Integer isDelete;
 
+    /**
+     * 实际完工日期
+     */
+    @TableField("real_end_date")
+    private LocalDate realEndDate;
+
     @TableField(exist = false)
     private String  steelStampNumber;
 

+ 2 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/PlanMapper.xml

@@ -38,11 +38,12 @@
         <result column="vehicle_num_end" property="vehicleNumEnd" />
         <result column="hide_state" property="hideState" />
         <result column="is_delete" property="isDelete" />
+        <result column="real_end_date" property="realEndDate" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, product_scheduling_num, product_id, product_name, project_code, company_id, num, main_process, station_id, station_name, foreman_id, foreman_name, plan_type, start_date, end_date, plan_total_wages, progress, task_name, task_type_id, task_type_name, check_type, task_change_notice_num, plan_man_num, plan_work_hour, money_of_job, describtion, version_number, create_time, create_id, status, vehicle_num_start, vehicle_num_end, hide_state, is_delete
+        id, product_scheduling_num, product_id, product_name, project_code, company_id, num, main_process, station_id, station_name, foreman_id, foreman_name, plan_type, start_date, end_date, plan_total_wages, progress, task_name, task_type_id, task_type_name, check_type, task_change_notice_num, plan_man_num, plan_work_hour, money_of_job, describtion, version_number, create_time, create_id, status, vehicle_num_start, vehicle_num_end, hide_state, is_delete, real_end_date
     </sql>
 
 </mapper>

+ 4 - 3
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ReportMapper.xml

@@ -315,7 +315,7 @@
         b.foreman_name as userName,IFNULL(ROUND(SUM(a.total_working_hours),2),0) as planWorkTime,IFNULL(ROUND(SUM(a.total_wages),2),0)  as planCost,
         IFNULL(ROUND(SUM(a.`total_fill_time`),2),0) AS nowWorkTime,
         IFNULL(ROUND(SUM(a.`total_wages`*a.`total_progress`/100),2),0) AS nowCost,
-        b.product_name as productName,b.num as planNum,DATE_FORMAT(b.start_date,'%Y-%m-%d') as startDate,DATE_FORMAT(b.end_date,'%Y-%m-%d') as endDate,b.station_name as statinoName
+        b.product_name as productName,b.num as planNum,DATE_FORMAT(b.start_date,'%Y%m%d') as startDate,DATE_FORMAT(b.end_date,'%Y%m%d') as endDate,DATE_FORMAT(b.real_end_date,'%Y%m%d') as realEndDate,b.station_name as statinoName
         from plan b
         left join plan_procedure_total a on a.plan_id=b.id
         left join user u on u.id=b.station_id
@@ -494,15 +494,16 @@
     </select>
 
     <select id="getPlanDataWithUserId" resultType="java.util.Map">
-        select DATE_FORMAT(r.create_date,'%Y%m%d') as createDate, IFNULL(SUM(r.working_time),0) as workingTime,
+        select DATE_FORMAT(p.start_date,'%Y%m%d') as createDate, IFNULL(SUM(r.working_time),0) as workingTime,
         IFNULL(SUM(r.cost),0) as cost,pp.product_name as productName,pp.product_id as productId,pp.name as procedureName,pp.id as procedureId,r.finish_num as finishNum
         from
         report r
+        left join plan p on r.plan_id=p.id
         left join prod_procedure pp on r.prod_procedure_id=pp.id
         <where>
             r.company_id=#{companyId}
             <if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''">
-                and r.create_date between #{startDate} and #{endDate}
+                and p.start_date between #{startDate} and #{endDate}
             </if>
             <if test="userId!=null">
                 and r.creator_id=#{userId}

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/statistic/index.vue

@@ -166,6 +166,9 @@
                 <el-table-column align="center"  label="当前工时" min-width="250">
                   <template slot-scope="scope" v-if="scope.row.nowWorkTime">{{scope.row.nowWorkTime}}分钟 {{scope.row.nowCost}}元</template>
                 </el-table-column>
+                <el-table-column align="center"  label="实际完工日期" min-width="150">
+                  <template slot-scope="scope" v-if="scope.row.realEndDate">{{scope.row.realEndDate}}</template>
+                </el-table-column>
                 <el-table-column align="center"  label="进度" min-width="250">
                   <template slot-scope="scope" v-if="scope.row.progress">{{scope.row.progress}}</template>
                 </el-table-column>