Compare commits
2 Commits
bc7eeb87e6
...
007e4eed3a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
007e4eed3a | ||
![]() |
052ae1e380 |
|
@ -41,6 +41,10 @@ public class Fault extends BaseEntity
|
||||||
@ApiModelProperty("商戶编号")
|
@ApiModelProperty("商戶编号")
|
||||||
private Long storeId;
|
private Long storeId;
|
||||||
|
|
||||||
|
@Excel(name = "运营区id")
|
||||||
|
@ApiModelProperty("运营区编号")
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
@Excel(name = "故障部位")
|
@Excel(name = "故障部位")
|
||||||
@ApiModelProperty("故障部位")
|
@ApiModelProperty("故障部位")
|
||||||
private String faultSite;
|
private String faultSite;
|
||||||
|
|
|
@ -9,4 +9,7 @@ import java.util.Date;
|
||||||
@Data
|
@Data
|
||||||
public class FaultVO extends Fault{
|
public class FaultVO extends Fault{
|
||||||
|
|
||||||
|
@ApiModelProperty("用户")
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bf.vehicle_code,
|
bf.vehicle_code,
|
||||||
bf.picture,
|
bf.picture,
|
||||||
bf.order_id,
|
bf.order_id,
|
||||||
|
bf.area_id,
|
||||||
bf.fault_site,
|
bf.fault_site,
|
||||||
bf.fault_detail,
|
bf.fault_detail,
|
||||||
bf.appeal_status,
|
bf.appeal_status,
|
||||||
|
@ -21,8 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bf.user_id,
|
bf.user_id,
|
||||||
bf.vehicle_num,
|
bf.vehicle_num,
|
||||||
bf.store_id,
|
bf.store_id,
|
||||||
|
ba.name as area_name,
|
||||||
su.agent_id
|
su.agent_id
|
||||||
<include refid="searchTables"></include>
|
from bst_fault bf
|
||||||
|
left join bst_area ba on bf.area_id = ba.id
|
||||||
|
left join sys_user su on bf.store_id = su.user_id
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="searchTables">
|
<sql id="searchTables">
|
||||||
from bst_fault bf
|
from bst_fault bf
|
||||||
|
@ -47,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="query.appealStatus != null and query.appealStatus != ''"> and bf.appeal_status = #{query.appealStatus}</if>
|
<if test="query.appealStatus != null and query.appealStatus != ''"> and bf.appeal_status = #{query.appealStatus}</if>
|
||||||
${@com.ruoyi.framework.util.DataScopeUtil@dataScope(
|
${@com.ruoyi.framework.util.DataScopeUtil@dataScope(
|
||||||
null,
|
null,
|
||||||
"bf.store_id,su.agent_id,bf.user_id",
|
"bf.store_id,su.agent_id",
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
query.scope
|
query.scope
|
||||||
|
@ -59,8 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectFaultVo"/>
|
<include refid="selectFaultVo"/>
|
||||||
<where>
|
<where>
|
||||||
<include refid="searchCondition"/>
|
<include refid="searchCondition"/>
|
||||||
order by bf.create_time desc
|
|
||||||
</where>
|
</where>
|
||||||
|
order by bf.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectFaultById" parameterType="Long" resultMap="FaultResult">
|
<select id="selectFaultById" parameterType="Long" resultMap="FaultResult">
|
||||||
|
@ -86,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="picture != null and picture != ''">picture,</if>
|
<if test="picture != null and picture != ''">picture,</if>
|
||||||
<if test="storeId != null and storeId != ''">store_id,</if>
|
<if test="storeId != null and storeId != ''">store_id,</if>
|
||||||
<if test="orderId != null">order_id,</if>
|
<if test="orderId != null">order_id,</if>
|
||||||
|
<if test="areaId != null">area_id,</if>
|
||||||
<if test="faultSite != null and faultSite != ''">fault_site,</if>
|
<if test="faultSite != null and faultSite != ''">fault_site,</if>
|
||||||
<if test="faultDetail != null">fault_detail,</if>
|
<if test="faultDetail != null">fault_detail,</if>
|
||||||
<if test="appealStatus != null and appealStatus != ''">appeal_status,</if>
|
<if test="appealStatus != null and appealStatus != ''">appeal_status,</if>
|
||||||
|
@ -100,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="picture != null and picture != ''">#{picture},</if>
|
<if test="picture != null and picture != ''">#{picture},</if>
|
||||||
<if test="storeId != null and storeId != ''">#{storeId},</if>
|
<if test="storeId != null and storeId != ''">#{storeId},</if>
|
||||||
<if test="orderId != null">#{orderId},</if>
|
<if test="orderId != null">#{orderId},</if>
|
||||||
|
<if test="areaId != null">#{areaId},</if>
|
||||||
<if test="faultSite != null and faultSite != ''">#{faultSite},</if>
|
<if test="faultSite != null and faultSite != ''">#{faultSite},</if>
|
||||||
<if test="faultDetail != null">#{faultDetail},</if>
|
<if test="faultDetail != null">#{faultDetail},</if>
|
||||||
<if test="appealStatus != null and appealStatus != ''">#{appealStatus},</if>
|
<if test="appealStatus != null and appealStatus != ''">#{appealStatus},</if>
|
||||||
|
|
|
@ -47,6 +47,7 @@ public class FaultConverterImpl implements FaultConverter {
|
||||||
po.setCreateTime(DateUtils.getNowDate());
|
po.setCreateTime(DateUtils.getNowDate());
|
||||||
po.setUserName(fault.getCreateBy());
|
po.setUserName(fault.getCreateBy());
|
||||||
po.setUserId(fault.getUserId());
|
po.setUserId(fault.getUserId());
|
||||||
|
po.setAreaId(device.getAreaId());
|
||||||
|
|
||||||
po.setStoreId(device.getMchId());
|
po.setStoreId(device.getMchId());
|
||||||
if (device.getOrderId() != null && fault.getOrderId().equals(device.getOrderId())) {
|
if (device.getOrderId() != null && fault.getOrderId().equals(device.getOrderId())) {
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class FaultServiceImpl implements FaultService
|
||||||
{
|
{
|
||||||
fault.setCreateTime(DateUtils.getNowDate());
|
fault.setCreateTime(DateUtils.getNowDate());
|
||||||
fault.setUserId(SecurityUtils.getLoginUser().getUserId());
|
fault.setUserId(SecurityUtils.getLoginUser().getUserId());
|
||||||
DeviceVO vo = deviceService.selectDeviceBySn(fault.getVehicleNum());
|
DeviceVO vo = deviceService.selectDeviceBySn(fault.getVehicleCode());
|
||||||
ServiceUtil.assertion(vo==null,"当前设备不存在");
|
ServiceUtil.assertion(vo==null,"当前设备不存在");
|
||||||
return faultMapper.insertFault(fault);
|
return faultMapper.insertFault(fault);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,6 @@ public class FaultController extends BaseController
|
||||||
startPage();
|
startPage();
|
||||||
startOrderBy();
|
startOrderBy();
|
||||||
query.setScope(true);
|
query.setScope(true);
|
||||||
query.setStoreId(getUserId());
|
|
||||||
List<FaultVO> list = faultService.selectFaultList(query);
|
List<FaultVO> list = faultService.selectFaultList(query);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user