Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
1314beb2
由
康伟
编写于
2025-03-05 14:10:41 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge remote-tracking branch 'origin/master'
2 个父辈
31d00ae2
564a2a15
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
10 行删除
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/EquipmentMaintainTaskMapper.xml
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/ProductionEquipmentMapper.xml
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/impl/ProductionEquipmentServiceImpl.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/EquipmentMaintainTaskMapper.xml
查看文件 @
1314beb
...
...
@@ -10,14 +10,15 @@
emt.end_time AS endTime,
emt.start_time AS startTime,
emt.depart_id,
(select depart_name from sys_depart where id
=
emt.depart_id) AS depart_name,
(select depart_name from sys_depart where id
=
emt.depart_id) AS depart_name,
emt.maintain_plan_name AS maintainPlanName,
emt.maintain_mode AS maintainMode,
emt.maintain_level AS maintainLevel,
emt.maintainer_id AS maintainerId,
(select realname from sys_user where id
=
emt.maintainer_id) AS maintainerName,
(select realname from sys_user where id
=
emt.maintainer_id) AS maintainerName,
emt.maintain_time AS maintainTime,
emt.plan_id AS planId,
emt.maintenance_cost AS maintenanceCost,
emt.real_start_time AS realStartTime,
emt.real_end_time AS realEndTime,
emt.working_hours AS workingHours,
...
...
@@ -36,7 +37,7 @@
LEFT JOIN equipment_maintain_plan emp ON emp.id=emt.plan_id
LEFT JOIN equipment_info ei ON ei.id=emt.equipment_id
<where>
emt.
del_flag=0 and emt.start_time
<
=now()
emt.del_flag=0 and emt.start_time
<
=now()
<if
test=
"equipmentMaintainTask.planArrangerId !=null and equipmentMaintainTask.planArrangerId!='' and equipmentMaintainTask.getType==0"
>
AND (emt.maintainer_id = #{equipmentMaintainTask.planArrangerId} or (emp.plan_accepter_id= #{equipmentMaintainTask.planArrangerId}))
AND results_enforcement!='4'
...
...
@@ -95,7 +96,7 @@
</if>
</where>
<!-- order by emt.depart_id desc , ei.equipment_name asc ,ei.structures asc -->
order BY emt.depart_id asc
, ei.equipment_name asc ,
emt.start_time desc
order BY emt.depart_id asc
,ei.equipment_name asc,
emt.start_time desc
</select>
<update
id=
"updateResultsEnforcement"
>
update equipment_maintain_task
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/ProductionEquipmentMapper.xml
查看文件 @
1314beb
...
...
@@ -840,9 +840,9 @@
SELECT t.MONTH AS month,
(
SELECT
IFNULL(sum(etc.material_cost+etc.maintenance_cost+etc.labor_cost+etc.machinery_cost+etc.service_cost+etc.wastage_cost+etc.other
_cost),0)
IFNULL(sum(emt.maintenance
_cost),0)
FROM
equipment_maintain_task emt LEFT JOIN equipment_task_cost etc ON etc.task_id=emt.id
equipment_maintain_task emt
WHERE
LEFT ( emt.maintain_time, 7 ) = t.MONTH AND emt.del_flag = 0 and emt.depart_id in(${departIds})
) AS maintainCost,
...
...
@@ -871,9 +871,9 @@
SELECT t.MONTH AS month,
(
SELECT
IFNULL(sum(etc.material_cost+etc.maintenance_cost+etc.labor_cost+etc.machinery_cost+etc.service_cost+etc.wastage_cost+etc.other
_cost),0)
IFNULL(sum(emt.maintenance
_cost),0)
FROM
equipment_maintain_task emt LEFT JOIN equipment_task_cost etc ON etc.task_id=emt.id
equipment_maintain_task emt
WHERE
LEFT ( emt.maintain_time, 7 ) = t.MONTH AND emt.del_flag = 0 and emt.depart_id in(${departIds})
) AS maintainCost,
...
...
@@ -902,8 +902,8 @@
<select
id=
"getContrastCostDetails"
resultType=
"java.util.Map"
>
select d.id depart_id , d.depart_name ,ifnull(aaa.maintainCost,0) maintainCost,ifnull(bbb.repairCost,0) repairCost from sys_depart d
left join (
SELECT emt.depart_id , IFNULL(sum(e
tc.material_cost+etc.maintenance_cost+etc.labor_cost+etc.machinery_cost+etc.service_cost+etc.wastage_cost+etc.other
_cost),0) maintainCost
FROM equipment_maintain_task emt
LEFT JOIN equipment_task_cost etc ON etc.task_id=emt.id
SELECT emt.depart_id , IFNULL(sum(e
mt.maintenance
_cost),0) maintainCost
FROM equipment_maintain_task emt
WHERE emt.del_flag = 0 and emt.maintain_time
>
= #{startTime} and emt.maintain_time
<
= #{endTime}
group by emt.depart_id
) aaa on aaa.depart_id = d.id
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/impl/ProductionEquipmentServiceImpl.java
查看文件 @
1314beb
...
...
@@ -536,6 +536,8 @@ public class ProductionEquipmentServiceImpl implements IProductionEquipmentServi
v
=
DoubleOperaUtils
.
bigDecimalRound
((
increase
*
30
-
downtime
)
/
(
increase
*
30
),
2
)*
100
;
}
contrastVO
.
setMonth
(
month
);
//增加v的值不能为负数逻辑
if
(
v
<
0
)
{
v
=
0.00
;
}
contrastVO
.
setRepairNum
(
v
+
"%"
);
yearOnYear
.
forEach
(
y
->
{
String
lastYear1
=
(
String
)
y
.
get
(
"lastYear"
);
...
...
@@ -547,6 +549,7 @@ public class ProductionEquipmentServiceImpl implements IProductionEquipmentServi
if
(
increase1
>
0
)
{
v1
=
DoubleOperaUtils
.
bigDecimalRound
((
increase1
*
30
-
downtime1
)
/
(
increase1
*
30
),
2
)*
100
;
}
if
(
v1
<
0
)
{
v1
=
0.00
;
}
contrastVO
.
setMaintainNum
(
v1
+
"%"
);
}
});
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论