Compare commits

..

No commits in common. "007e4eed3a5be57d14ee4aec2084abf1adf4a750" and "bc7eeb87e69dc1a24fc42f2c25893d5bc97e8dd3" have entirely different histories.

6 changed files with 5 additions and 18 deletions

View File

@ -41,10 +41,6 @@ public class Fault extends BaseEntity
@ApiModelProperty("商戶编号")
private Long storeId;
@Excel(name = "运营区id")
@ApiModelProperty("运营区编号")
private Long areaId;
@Excel(name = "故障部位")
@ApiModelProperty("故障部位")
private String faultSite;

View File

@ -9,7 +9,4 @@ import java.util.Date;
@Data
public class FaultVO extends Fault{
@ApiModelProperty("用户")
private String areaName;
}

View File

@ -13,7 +13,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bf.vehicle_code,
bf.picture,
bf.order_id,
bf.area_id,
bf.fault_site,
bf.fault_detail,
bf.appeal_status,
@ -22,11 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bf.user_id,
bf.vehicle_num,
bf.store_id,
ba.name as area_name,
su.agent_id
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
<include refid="searchTables"></include>
</sql>
<sql id="searchTables">
from bst_fault bf
@ -51,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.appealStatus != null and query.appealStatus != ''"> and bf.appeal_status = #{query.appealStatus}</if>
${@com.ruoyi.framework.util.DataScopeUtil@dataScope(
null,
"bf.store_id,su.agent_id",
"bf.store_id,su.agent_id,bf.user_id",
null,
null,
query.scope
@ -63,8 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectFaultVo"/>
<where>
<include refid="searchCondition"/>
order by bf.create_time desc
</where>
order by bf.create_time desc
</select>
<select id="selectFaultById" parameterType="Long" resultMap="FaultResult">
@ -90,7 +86,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="picture != null and picture != ''">picture,</if>
<if test="storeId != null and storeId != ''">store_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="faultDetail != null">fault_detail,</if>
<if test="appealStatus != null and appealStatus != ''">appeal_status,</if>
@ -105,7 +100,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="picture != null and picture != ''">#{picture},</if>
<if test="storeId != null and storeId != ''">#{storeId},</if>
<if test="orderId != null">#{orderId},</if>
<if test="areaId != null">#{areaId},</if>
<if test="faultSite != null and faultSite != ''">#{faultSite},</if>
<if test="faultDetail != null">#{faultDetail},</if>
<if test="appealStatus != null and appealStatus != ''">#{appealStatus},</if>

View File

@ -47,7 +47,6 @@ public class FaultConverterImpl implements FaultConverter {
po.setCreateTime(DateUtils.getNowDate());
po.setUserName(fault.getCreateBy());
po.setUserId(fault.getUserId());
po.setAreaId(device.getAreaId());
po.setStoreId(device.getMchId());
if (device.getOrderId() != null && fault.getOrderId().equals(device.getOrderId())) {

View File

@ -81,7 +81,7 @@ public class FaultServiceImpl implements FaultService
{
fault.setCreateTime(DateUtils.getNowDate());
fault.setUserId(SecurityUtils.getLoginUser().getUserId());
DeviceVO vo = deviceService.selectDeviceBySn(fault.getVehicleCode());
DeviceVO vo = deviceService.selectDeviceBySn(fault.getVehicleNum());
ServiceUtil.assertion(vo==null,"当前设备不存在");
return faultMapper.insertFault(fault);
}

View File

@ -49,6 +49,7 @@ public class FaultController extends BaseController
startPage();
startOrderBy();
query.setScope(true);
query.setStoreId(getUserId());
List<FaultVO> list = faultService.selectFaultList(query);
return getDataTable(list);
}