Commit d174186f authored by litengwei's avatar litengwei

浙江设备平台接口开发

parent 91f874a9
......@@ -65,4 +65,16 @@ public class FireBussForEquPlatformController extends AbstractBaseController {
return equipmentSpecificSerivce.selectZJEquipmentSpecificWWX(equipmentSpecific);
}
/**
* 更换报废分页
*
* @return
*/
@RequestMapping(value = "/wwx/ids", method = RequestMethod.POST)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "更换报废业务字段", notes = "更换报废业务字段修,未报废")
public List<Map<String,Object>> selectZJEquipmentSpecificWWXByIds(@RequestBody Map<String, Object> objectMap) {
return equipmentSpecificSerivce.selectZJEquipmentSpecificWWXByIds(objectMap.get("bussIds").toString());
}
}
......@@ -328,6 +328,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
IPage<Map<String, Object>> selectZJEquipmentSpecificWWX(Page page, EquipmentSpecificDTO equipmentSpecific);
List<Map<String, Object>> selectZJEquipmentSpecificWWXByIds(String bussIds);
}
......@@ -46,6 +46,14 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
*/
IPage<Map<String,Object>> selectZJEquipmentSpecificWWX(EquipmentSpecificDTO equipmentSpecific);
/**
* 补码页面查询分页
*
* @param bussIds
* @return
*/
List<Map<String,Object>> selectZJEquipmentSpecificWWXByIds(String bussIds);
/**
......
......@@ -435,6 +435,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
@Override
public List<Map<String,Object>> selectZJEquipmentSpecificWWXByIds(String bussIds) {
return this.baseMapper.selectZJEquipmentSpecificWWXByIds( bussIds);
}
@Override
public EquipmentSpecific updateEquipmentSpecific(EquipmentSpecific equipmentSpecific, ReginParams reginParams, AgencyUserModel agencyUserModel) {
SimpleDateFormat stf = new SimpleDateFormat("yyyy-MM-dd");
// @TableField(updateStrategy = FieldStrategy.IGNORED) 置空不生效 为空单独设置 by kongfm 2021-09-10
......
......@@ -174,8 +174,20 @@ public class CheckController extends AbstractBaseController {
}
/**
*
* 浙江省设备平台今日巡查任务按业务id查询
* **/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "巡检记录查询", notes = "巡检记录查询")
@RequestMapping(value = "/getPlanTaskCheckInfoByIds", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse getPlanTaskCheckInfoByIds(
@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) CheckInfoPageParam param
) {
List<CheckInfoVo> list = checkService.getPlanTaskCheckInfoByIds(param);
return CommonResponseUtil.success(list);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -23,6 +23,8 @@ public interface CheckMapper extends BaseMapper {
List<CheckInfoVo> getPlanTaskCheckInfo(CheckInfoPageParam param);
List<CheckInfoVo> getPlanTaskCheckInfoByIds(CheckInfoPageParam param);
List<CheckInfoVo> getCheckInfoNew(CheckInfoPageParam param);
long getCheckInfoCount(CheckInfoPageParam param);
......
......@@ -109,7 +109,7 @@ public class CheckInfoPageParam extends CommonPageable{
private String isExecute;
private String bussIds;
}
......@@ -178,6 +178,11 @@ public class CheckServiceImpl implements ICheckService {
return new PageImpl<>(content, param, total);
}
public List<CheckInfoVo> getPlanTaskCheckInfoByIds(CheckInfoPageParam param) {
List<CheckInfoVo> list = checkMapper.getPlanTaskCheckInfoByIds(param);
return list;
}
public Page<CheckInfoVo> getPeoplePatrolPage(CheckInfoPageParam param) {
long total = checkMapper.getPeoplePageCount(param);
List<CheckInfoVo> content = Lists.newArrayList();
......
......@@ -265,6 +265,8 @@ public interface ICheckService {
Page<CheckInfoVo> getPlanTaskCheckInfo(CheckInfoPageParam param);
List<CheckInfoVo> getPlanTaskCheckInfoByIds(CheckInfoPageParam param);
Page<CheckInfoVo> getPeoplePatrolPage(CheckInfoPageParam param);
Map<String, Object> getPeopleStatistic(String bizOrgCode, String userId);
......
......@@ -49,6 +49,36 @@ public class CheckInfoVo {
private String problemNum;
private String beginTime;
private String endTime;
private String sched;
public String getBeginTime() {
return beginTime;
}
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getSched() {
return sched;
}
public void setSched(String sched) {
this.sched = sched;
}
private String handleStatus;
public String getProblemNum() {
......
......@@ -2851,6 +2851,28 @@
</if>
</select>
<select id="selectZJEquipmentSpecificWWXByIds" resultType="java.util.Map">
SELECT
es.id,
es.name,
es.biz_org_name bizOrgName,
es.code,
es.position,
ed.standard,
DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE ) AS dayNum
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
LEFT JOIN wl_equipment e ON ed.equipment_id = e.id
LEFT JOIN wl_stock_detail sd ON sd.equipment_detail_id = ed.id
WHERE
ed.production_date IS NOT NULL
AND e.expiry_date IS NOT NULL
<if test="bussIds != null and bussIds != ''">
And find_in_set(es.id, #{bussIds}) > 0
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -7,11 +7,16 @@
<result property="orgCode" column="org_code"/>
<result property="pointId" column="point_Id"/>
<result property="pointName" column="point_Name"/>
<result property="planName" column="plan_name"/>
<result property="pointNo" column="pointNo"/>
<result property="userId" column="user_Id"/>
<result property="userName" column="user_Name"/>
<result property="departmentName" column="department_name"/>
<result property="checkTime" column="checkDate"/>
<result property="beginTime" column="beginTime"/>
<result property="endTime" column="endTime"/>
<result property="sched" column="sched"/>
<result property="finishStatus" column="Finish_Status"/>
<result property="uploadTime" column="upload_Time"/>
<result property="isOk" column="is_ok"/>
<result property="routeName" column="route_name"/>
......@@ -306,6 +311,25 @@
</choose>
</select>
<select id="getPlanTaskCheckInfoByIds" resultMap="checkInfoMap">
SELECT
a.id,
c.`name` plan_name,
a.user_name user_name,
Round( a.finish_num / a.point_num, 2 ) sched,
a.begin_time beginTime ,
a.end_time endTime,
( CASE a.finish_status WHEN 0 THEN '未开始' WHEN 1 THEN '进行中' WHEN 2 THEN '已结束' ELSE '已超时' END ) AS `Finish_Status`
FROM
p_plan_task a
LEFT JOIN p_plan c ON c.id = a.plan_id
<where>
<if test="bussIds != null and bussIds != ''">
find_in_set(a.id, #{bussIds}) > 0
</if>
</where>
</select>
<select id="getCheckInfoNew" resultMap="checkInfoMap">
SELECT
a.id,
......
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