| | |
| | | return R.data(cssum); |
| | | } |
| | | |
| | | /** |
| | | * 农产品监管 |
| | | */ |
| | | @GetMapping("/productsSupervise") |
| | | public R productsSupervise(String year,String deptId) { |
| | | |
| | | Map<String, String> cssum = farmProductStockService.productsSupervise(year, deptId); |
| | | |
| | | return R.data(cssum); |
| | | } |
| | | |
| | | } |
| | |
| | | Map<String, String> selctProductCount(String year); |
| | | Map<String, String> statisticsStock(String year,String deptId); |
| | | Map<String, String> statisticsStockMonth(String year,String deptId); |
| | | Map<String, String> productsSupervise(String year,String deptId); |
| | | List<Map<String, Double>> statisticsYield(String year,String deptId); |
| | | boolean stockCompare(double sale,String id); |
| | | boolean stockReduce(double sale,String id); |
| | |
| | | and dept_id = #{deptId} |
| | | </if> |
| | | </select> |
| | | <!--农产品监管--> |
| | | <select id="productsSupervise" resultType="java.util.HashMap"> |
| | | SELECT |
| | | IFNULL( SUM( CASE WHEN LEAVES = 0 THEN weight END ), 0 ) AS '0', |
| | | IFNULL( SUM( CASE WHEN LEAVES = 1 THEN weight END ), 0 ) AS '1', |
| | | IFNULL( SUM( CASE WHEN LEAVES = 2 THEN weight END ), 0 ) AS '2', |
| | | IFNULL( SUM( CASE WHEN LEAVES = 3 THEN weight END ), 0 ) AS '3', |
| | | IFNULL( SUM( CASE WHEN LEAVES = 4 THEN weight END ), 0 ) AS '4' |
| | | FROM |
| | | sys_recovery |
| | | WHERE |
| | | 1 = 1 |
| | | <if test="year!=null and year!=''"> |
| | | and YEAR ( time ) = #{year} |
| | | </if> |
| | | <if test="deptId!=null and deptId!=''"> |
| | | and dept_id = #{deptId} |
| | | </if> |
| | | </select> |
| | | <!--大屏经营概况年产量统计--> |
| | | <select id="statisticsYield" resultType="java.util.HashMap"> |
| | | SELECT |
| | |
| | | Map<String, String> selctProductCount(String year); |
| | | Map<String, String> statisticsStock(String year,String deptId); |
| | | Map<String, String> statisticsStockMonth(String year,String deptId); |
| | | Map<String, String> productsSupervise(String year,String deptId); |
| | | List<Map<String, Double>> statisticsYield(String year, String deptId); |
| | | //查看库存是否充足 |
| | | boolean stockCompare(double sale,String id); |
| | |
| | | return baseMapper.statisticsStockMonth(year,deptId); |
| | | } |
| | | @Override |
| | | public Map<String, String> productsSupervise(String year,String deptId) { |
| | | return baseMapper.productsSupervise(year,deptId); |
| | | } |
| | | @Override |
| | | public List<Map<String, Double>> statisticsYield(String year,String deptId) { |
| | | return baseMapper.statisticsYield(year,deptId); |
| | | } |