修改 发泡

master
wangh 3 years ago
parent 65bbaa00b3
commit a80c2f3188

@ -1,6 +1,7 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@ -50,6 +51,13 @@ public interface BroadDataMapper {
List<BoxOutput> mtk_selectInStore3d();
BoxOutput selectNowXkOutPut();
int selectXK_H_QTY();
int selectNowXkOutPut1();
void insertXK_H_QTY(@Param("name") String name,@Param("nowOut") int nowOut,@Param("cha") int cha,@Param("zs") int zsQty);
///////////////////////////////////////////////////////////////////////////
// 6

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.system.domain.BoxOutput;
import com.ruoyi.system.mapper.BroadDataMapper;
import com.ruoyi.system.service.IBroadDruidService;
import org.springframework.beans.factory.annotation.Autowired;
@ -17,6 +18,10 @@ public class BroadDruidServiceImpl implements IBroadDruidService {
private BroadDataMapper mapper;
public void createWork(){
BoxOutput boxOutput=mapper.selectNowXkOutPut();
int nowOut=boxOutput.getQty();
int qty=mapper.selectXK_H_QTY();
int zsQty=mapper.selectNowXkOutPut1();
mapper.insertXK_H_QTY(boxOutput.getName(),nowOut,nowOut-qty,zsQty);
}
}

@ -403,4 +403,52 @@ group by MATERIAL_NAME
and to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
group by MATERIAL_NAME
</select>
<select id="selectNowXkOutPut" resultType="com.ruoyi.system.domain.BoxOutput">
select (TO_CHAR(SYSDATE, 'hh24') || ':30') as name,
nvl(sum(actual_qty), 0) as qty
from IMOS.IMOS_PR_PLAN
where plan_date is not null
and process_code = 1002
and delete_flag = '0'
and (to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd') or
to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate-1, 'yyyy-MM-dd'))
</select>
<select id="selectNowXkOutPut1" resultType="int">
select nvl(sum(actual_qty), 0)
from IMOS.IMOS_PR_PLAN
where plan_date is not null
and process_code = 1002
and delete_flag = '0'
-- and to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
and CREATION_DATE &gt;
case
when to_char(sysdate, 'hh24') &gt; 7 and to_char(sysdate, 'hh24') &lt; 20 then to_date(
to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
'yyyy-MM-dd hh24:mi:ss')
when to_char(sysdate, 'hh24') &lt; 7 then to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00',
'yyyy-MM-dd hh24:mi:ss')
else to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
end
and CREATION_DATE &lt;
case
when to_char(sysdate, 'hh24') &gt; 7 and to_char(sysdate, 'hh24') &lt; 20 then to_date(
to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00',
'yyyy-MM-dd hh24:mi:ss')
when to_char(sysdate, 'hh24') &lt; 7 then to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
'yyyy-MM-dd hh24:mi:ss')
else to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '24:00:00', 'yyyy-MM-dd hh24:mi:ss')
end
</select>
<select id="selectXK_H_QTY" resultType="int">
select * from ( select nvl(QTY, 0) from XK_H_QTY order by CREATE_TIME desc) where ROWNUM=1
</select>
<insert id="insertXK_H_QTY">
insert into XK_H_QTY(H_NAME, QTY, QTY_C,ZS_C)
values (#{name},#{nowOut},#{cha},#{zs})
</insert>
</mapper>
Loading…
Cancel
Save