修改 总装

master
wangh 4 years ago
parent 9da5b1f019
commit 5d125ac7b0

@ -0,0 +1,47 @@
package com.ruoyi.web.controller.broad;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.system.service.IBroadDataService;
import com.ruoyi.system.service.IBroadDruidService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* @author wanghao
* @date 2022/7/14 9:49
*/
@Controller
@RequestMapping("/broad/fp")
@ApiOperation("总装")
@ResponseBody
public class ZZJXBroadController {
@Autowired
IBroadDataService service;
@Autowired
IBroadDruidService iBroadDruidService;
@PostMapping("/selectProductInByTeam/{id}")
@ApiOperation("成品入库统计-当班")
private String selectProductInByTeam(@PathVariable("id")int id) {
if (id==0){
return JSONArray.toJSONString(service.zz_selectProductInByTeam());
}else {
return JSONArray.toJSONString(service.zz_selectProductInByDay());
}
}
}

@ -60,6 +60,10 @@ public interface BroadDataMapper {
int selectTeamGroups();
List<BoxOutput> zz_selectProductInByTeam();
List<BoxOutput> zz_selectProductInByDay();
///////////////////////////////////////////////////////////////////////////
// 6

@ -49,4 +49,8 @@ public interface IBroadDataService {
List<BoxOutput> selectFpOrderInfo();
List<BoxOutput> mtk_selectInStore3d();
List<BoxOutput> zz_selectProductInByTeam();
List<BoxOutput> zz_selectProductInByDay();
}

@ -112,4 +112,19 @@ public class BroadDataServiceImpl implements IBroadDataService
public List<BoxOutput> mtk_selectInStore3d() {
return mapper.mtk_selectInStore3d();
}
///////////////////////////////////////////////////////////////////////////
// 总装
///////////////////////////////////////////////////////////////////////////
@Override
public List<BoxOutput> zz_selectProductInByTeam() {
return mapper.zz_selectProductInByTeam();
}
@Override
public List<BoxOutput> zz_selectProductInByDay() {
return mapper.zz_selectProductInByDay();
}
}

@ -480,4 +480,23 @@
<select id="selectTeamGroups" resultType="integer">
select case when sysdate &lt; = W_END then 0 else 1 end from BASE_DAY_WBTIME where ROWNUM=1 order by CREATE_TIME desc
</select>
<select id="zz_selectProductInByDay" resultType="com.ruoyi.system.domain.BoxOutput">
select to_char(PRODUCTION_DATE, 'hh24') || ':30' as name, count(1) as qty
from IMOS_PR_PRODUCT_BARCODE
where to_char(PRODUCTION_DATE, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
group by to_char(PRODUCTION_DATE, 'hh24')
order by to_char(PRODUCTION_DATE, 'hh24')
</select>
<select id="zz_selectProductInByTeam" resultType="com.ruoyi.system.domain.BoxOutput">
select to_char(PRODUCTION_DATE, 'hh24') || ':30' as name, count(1) as qty
from IMOS_PR_PRODUCT_BARCODE ippb
left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) wb on 1 = 1
where ippb.PRODUCTION_DATE between case when sysdate &lt; = wb.W_END then W_START else W_END end
and case when sysdate &lt; = wb.W_END then W_END else B_END end
and DETIAL_TYPE_CODE = '1004'
group by to_char(PRODUCTION_DATE, 'hh24')
order by to_char(PRODUCTION_DATE, 'hh24')
</select>
</mapper>
Loading…
Cancel
Save