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,28 +19,32 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> { ...@@ -19,28 +19,32 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
/** /**
* 查询根据公司查询气瓶数量以及过期气瓶数 * 查询根据公司查询气瓶数量以及过期气瓶数
*
* @param sequenceNbr * @param sequenceNbr
* @return * @return
*/ */
Map<String, String> queryNumAndOutOfDateNum(@Param("sequenceNbr") Long sequenceNbr); Map<String, String> queryNumAndOutOfDateNum(@Param("sequenceNbr") Long sequenceNbr);
Integer getMonthInfoTotal(@Param("regionCode") String regionCode); Integer getMonthInfoTotal(@Param("regionCode") String regionCode);
/** /**
* 获取上个月气瓶总量 * 获取上个月气瓶总量
*
* @return * @return
*/ */
Integer getLastMonthInfoTotal(@Param("regionCode") String regionCode); Integer getLastMonthInfoTotal(@Param("regionCode") String regionCode);
/** /**
* 获取上上个月气瓶总量 * 获取上上个月气瓶总量
*
* @return * @return
*/ */
Integer getMonthBeforeLastInfoTotal(@Param("regionCode") String regionCode); Integer getMonthBeforeLastInfoTotal(@Param("regionCode") String regionCode);
/** /**
* 根据regionCode 获取气瓶数量 * 根据regionCode 获取气瓶数量
*
* @param regionCode * @param regionCode
* @return * @return
*/ */
...@@ -49,17 +53,20 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> { ...@@ -49,17 +53,20 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Double queryIntegirtyByAppId(@Param("appId") String appId); Double queryIntegirtyByAppId(@Param("appId") String appId);
Integer getWarnNum(String code); Integer getWarnNum(String code);
Integer getMonthInfoTotalUnit(@Param("appId") String appId); Integer getMonthInfoTotalUnit(@Param("appId") String appId);
/** /**
* 获取上个月气瓶总量-APPID * 获取上个月气瓶总量-APPID
*
* @return * @return
*/ */
Integer getLastMonthInfoTotalUnit(@Param("appId") String appId); Integer getLastMonthInfoTotalUnit(@Param("appId") String appId);
/** /**
* 获取上上个月气瓶总量-APPID * 获取上上个月气瓶总量-APPID
*
* @return * @return
*/ */
Integer getMonthBeforeLastInfoTotalUnit(@Param("appId") String appId); Integer getMonthBeforeLastInfoTotalUnit(@Param("appId") String appId);
...@@ -70,14 +77,13 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> { ...@@ -70,14 +77,13 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Page<CylinderInfoDto> queryPageListByEarlyWarningLevel(Page<CylinderInfoDto> page, @Param("earlyWarningLevel") String earlyWarningLevel); Page<CylinderInfoDto> queryPageListByEarlyWarningLevel(Page<CylinderInfoDto> page, @Param("earlyWarningLevel") String earlyWarningLevel);
/** /**
* 查询行政区划下的所有气瓶 * 查询行政区划下的所有气瓶
* *
* @param regionCode * @param regionCode
* @return * @return
*/ */
List<CylinderInfoDto> listWithRegionCode(Integer regionCode); List<CylinderInfoDto> listWithRegionCode(Integer regionCode);
Page<CylinderInfoDto> cyinderInfoList(Page<CylinderInfoDto> page, CylinderInfoDto cylinderInfoDto, String sort, List<String> appids); Page<CylinderInfoDto> cyinderInfoList(Page<CylinderInfoDto> page, CylinderInfoDto cylinderInfoDto, String sort, List<String> appids);
...@@ -88,14 +94,17 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> { ...@@ -88,14 +94,17 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Integer getInfoTotal(); Integer getInfoTotal();
void updateEsCylinderInfoStatus(@Param("ids")List<String> ids); void updateEsCylinderInfoStatus(@Param("ids") List<String> ids);
Integer saveOrUpdateBatch(@Param("list") List<CylinderInfo> list); 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); 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 @@ ...@@ -387,6 +387,21 @@
</where> </where>
</select> </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 id="countNumber" resultType="java.lang.Integer">
SELECT count(DISTINCT(onlyCode)) SELECT count(DISTINCT(onlyCode))
FROM( FROM(
......
...@@ -1329,4 +1329,13 @@ public class CylinderInfoController extends BaseController { ...@@ -1329,4 +1329,13 @@ public class CylinderInfoController extends BaseController {
map.put("status", number); map.put("status", number);
return ResponseHelper.buildResponse(map); 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