Commit a6335c89 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register
parents bc70d6b8 3cdadf57
......@@ -19,6 +19,7 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
/**
* 查询根据公司查询气瓶数量以及过期气瓶数
*
* @param sequenceNbr
* @return
*/
......@@ -29,18 +30,21 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
/**
* 获取上个月气瓶总量
*
* @return
*/
Integer getLastMonthInfoTotal(@Param("regionCode") String regionCode);
/**
* 获取上上个月气瓶总量
*
* @return
*/
Integer getMonthBeforeLastInfoTotal(@Param("regionCode") String regionCode);
/**
* 根据regionCode 获取气瓶数量
*
* @param regionCode
* @return
*/
......@@ -52,14 +56,17 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Integer getMonthInfoTotalUnit(@Param("appId") String appId);
/**
* 获取上个月气瓶总量-APPID
*
* @return
*/
Integer getLastMonthInfoTotalUnit(@Param("appId") String appId);
/**
* 获取上上个月气瓶总量-APPID
*
* @return
*/
Integer getMonthBeforeLastInfoTotalUnit(@Param("appId") String appId);
......@@ -70,7 +77,6 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Page<CylinderInfoDto> queryPageListByEarlyWarningLevel(Page<CylinderInfoDto> page, @Param("earlyWarningLevel") String earlyWarningLevel);
/**
* 查询行政区划下的所有气瓶
*
......@@ -88,14 +94,17 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Integer getInfoTotal();
void updateEsCylinderInfoStatus(@Param("ids")List<String> ids);
void updateEsCylinderInfoStatus(@Param("ids") List<String> ids);
Integer saveOrUpdateBatch(@Param("list") List<CylinderInfo> list);
Page<Map<String,Object>> timeOutList(@Param("page") Page<Map<String, Object>> page, @Param("companyId") String companyId, @Param("regionCode") String regionCode);
Page<Map<String, Object>> timeOutList(@Param("page") Page<Map<String, Object>> page, @Param("companyId") String companyId, @Param("regionCode") String regionCode);
Page<Map<String,Object>> licenceList(@Param("page") Page<Map<String, Object>> page, @Param("companyId") String companyId);
Page<Map<String, Object>> licenceList(@Param("page") Page<Map<String, Object>> page, @Param("companyId") String companyId);
int countNumber(@Param("status") String status, @Param("companyId") String companyId, @Param("regionCode") String regionCode);
Map<String, Object> countFillingTimesAndQuantityByCompany(@Param("companyId") String companyId, @Param("startTime") String startTime, @Param("endTime") String endTime);
}
......@@ -387,6 +387,21 @@
</where>
</select>
<select id="countFillingTimesAndQuantityByCompany" resultType="java.util.Map">
SELECT COUNT(1) AS fillingTimes, SUM(filling_quantity) AS fillingQuantity
FROM tz_cylinder_filling_record AS tcfr
<where>
<if test="companyId != null and companyId != ''">
tcfr."app_id" = #{companyId}
</if>
<if test="startTime != null">
AND DATE_FORMAT(tcfr."filling_starttime",'%Y-%m-%d') <![CDATA[>=]]> #{startTime}
</if>
<if test="endTime != null">
AND DATE_FORMAT(tcfr."filling_endtime",'%Y-%m-%d') <![CDATA[<=]]> #{endTime}
</if>
</where>
</select>
<select id="countNumber" resultType="java.lang.Integer">
SELECT count(DISTINCT(onlyCode))
FROM(
......
......@@ -1329,4 +1329,13 @@ public class CylinderInfoController extends BaseController {
map.put("status", number);
return ResponseHelper.buildResponse(map);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "某个企业充装次数及累计充装量统计")
@GetMapping(value = "/countFillingTimesAndQuantityByCompany")
public ResponseModel<Map<String,Object>> countFillingTimesAndQuantityByCompany(@RequestParam(value = "companyId") String companyId,
@RequestParam(value = "startTime", required = false) String startTime,
@RequestParam(value = "endTime", required = false) String endTime) {
return ResponseHelper.buildResponse(cylinderInfoServiceImpl.getBaseMapper().countFillingTimesAndQuantityByCompany(companyId, startTime, endTime));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment