Commit 45d2fe6f authored by litengwei's avatar litengwei

浙江省设备平台右屏接口代码提交

parent e9ff95c0
......@@ -25,4 +25,14 @@ public class EquipmentSpecificDTO extends BaseDTO<EquipmentSpecific> {
* 二维码
*/
private String qrcode;
/**
* bizOrgCode
*/
private String bizOrgCode;
/**
* type
*/
private String bussType;
}
......@@ -241,7 +241,11 @@ public class EquipmentDetailController extends AbstractBaseController {
String[] idArray = ids.split(",");
AtomicReference<String> name = new AtomicReference<>("");
fireFightingSystemService.listByIds(Arrays.asList(idArray)).forEach(x -> name.set(name.get() + x.getName() + ","));
fightingSystemEntity.setName(name.get().substring(0, name.get().length() - 1));
if(name.get().length() != 0) {
fightingSystemEntity.setName(name.get().substring(0, name.get().length() - 1));
} else {
fightingSystemEntity.setName("");
}
} else {
equipmentSpecific.setSystemName("");
}
......
package com.yeejoin.equipmanage.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO;
import com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -25,7 +26,7 @@ import java.util.Map;
@Api(tags = "浙江省设备平台右屏接口")
@RequestMapping(value = "/fire-buss-platform")
@Slf4j
public class FireBussForEquPlatformController {
public class FireBussForEquPlatformController extends AbstractBaseController {
@Autowired
......@@ -35,6 +36,8 @@ public class FireBussForEquPlatformController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("消防巡查")
public ResponseModel<List<Map<String, Object>>> getPatrolInfo(@RequestParam(required = false) String bizOrgCode){
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = reginParams.getPersonIdentity().getCompanyBizOrgCode();
List<Map<String, Object>> map = equipmentSpecificSerivce.getZJPatrolStatics(bizOrgCode);
return CommonResponseUtil.success(map);
}
......@@ -43,7 +46,23 @@ public class FireBussForEquPlatformController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("消防报废信息")
public ResponseModel<List<Map<String, Object>>> getScrapInfo(@RequestParam(required = false) String bizOrgCode){
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = reginParams.getPersonIdentity().getCompanyBizOrgCode();
List<Map<String, Object>> map = equipmentSpecificSerivce.getZJScrapStatics(bizOrgCode);
return CommonResponseUtil.success(map);
}
/**
* 更换报废分页
*
* @return
*/
@RequestMapping(value = "/wwx/page", method = RequestMethod.POST)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "更换报废分页", notes = "更换报废分页-未维修,未报废")
public IPage<Map<String,Object>> selectZJEquipmentSpecificWWX(@RequestBody EquipmentSpecificDTO equipmentSpecific) {
return equipmentSpecificSerivce.selectZJEquipmentSpecificWWX(equipmentSpecific);
}
}
......@@ -326,5 +326,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<Map<String, Object>> getZJScrapStatics(String bizOrgCode);
IPage<Map<String, Object>> selectZJEquipmentSpecificWWX(Page page, EquipmentSpecificDTO equipmentSpecific);
}
......@@ -39,6 +39,16 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
IPage<ComplementCodeVO> selectEquipmentSpecific(EquipmentSpecificDTO equipmentSpecific);
/**
* 补码页面查询分页
*
* @param equipmentSpecific
* @return
*/
IPage<Map<String,Object>> selectZJEquipmentSpecificWWX(EquipmentSpecificDTO equipmentSpecific);
/**
* 修改单个设备
* 业务逻辑:修改
* 如果已经入库数据只需要修改单个设备的信息及入库位置
......
......@@ -429,6 +429,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
@Override
public IPage<Map<String,Object>> selectZJEquipmentSpecificWWX(EquipmentSpecificDTO equipmentSpecific) {
return this.baseMapper.selectZJEquipmentSpecificWWX(equipmentSpecific.getPage(), equipmentSpecific);
}
@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
......
......@@ -2724,7 +2724,7 @@
UNION ALL
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'' AS unit,
'%' AS unit,
'执行进度' AS `name`,
'zxjd' AS `indexKey`,
'xfxc' AS type,
......@@ -2741,7 +2741,7 @@
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'个' AS unit,
'今日漏查点位' AS `name`,
'漏查点位' AS `name`,
'currentDayMiss' AS `indexKey`,
'xfxc' AS type,
'3' AS `key`
......@@ -2805,7 +2805,41 @@
AND e.expiry_date IS NOT NULL
AND es.biz_org_code LIKE concat(#{bizOrgCode}, '%')
AND 30 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
AND DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE ) >= 0
) AS `value`
</select>
<select id="selectZJEquipmentSpecificWWX" resultType="java.util.Map">
SELECT
es.name,
es.biz_org_name bizOrgName,
es.code,
es.position,
ed.standard
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
AND es.biz_org_code LIKE concat(#{equipmentSpecific.bizOrgCode}, '%')
<if test="equipmentSpecific.bussType == 'wwx'">
AND 0 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
AND ( (sd.`status` != 3) or (sd.`status` is null) or (sd.`status` = ''))
</if>
<if test="equipmentSpecific.bussType == 'wbf'">
AND 0 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
AND ( (sd.`status` != 7) or (sd.`status` is null) or (sd.`status` = ''))
</if>
<if test="equipmentSpecific.bussType == 'due'">
AND ( (sd.`status` != 7) or (sd.`status` is null) or (sd.`status` = ''))
AND 30 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
AND DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE ) >= 0
</if>
</select>
</mapper>
\ No newline at end of file
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