故障新增运营区
This commit is contained in:
parent
dcfedad087
commit
052ae1e380
|
@ -41,6 +41,10 @@ public class Fault extends BaseEntity
|
|||
@ApiModelProperty("商戶编号")
|
||||
private Long storeId;
|
||||
|
||||
@Excel(name = "运营区id")
|
||||
@ApiModelProperty("运营区编号")
|
||||
private Long areaId;
|
||||
|
||||
@Excel(name = "故障部位")
|
||||
@ApiModelProperty("故障部位")
|
||||
private String faultSite;
|
||||
|
|
|
@ -9,4 +9,7 @@ import java.util.Date;
|
|||
@Data
|
||||
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.picture,
|
||||
bf.order_id,
|
||||
bf.area_id,
|
||||
bf.fault_site,
|
||||
bf.fault_detail,
|
||||
bf.appeal_status,
|
||||
|
@ -21,8 +22,11 @@ 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
|
||||
<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 id="searchTables">
|
||||
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>
|
||||
${@com.ruoyi.framework.util.DataScopeUtil@dataScope(
|
||||
null,
|
||||
"bf.store_id,su.agent_id,bf.user_id",
|
||||
"bf.store_id,su.agent_id",
|
||||
null,
|
||||
null,
|
||||
query.scope
|
||||
|
@ -59,8 +63,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">
|
||||
|
@ -86,6 +90,7 @@ 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>
|
||||
|
@ -100,6 +105,7 @@ 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>
|
||||
|
|
|
@ -47,6 +47,7 @@ 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())) {
|
||||
|
|
|
@ -81,7 +81,7 @@ public class FaultServiceImpl implements FaultService
|
|||
{
|
||||
fault.setCreateTime(DateUtils.getNowDate());
|
||||
fault.setUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
DeviceVO vo = deviceService.selectDeviceBySn(fault.getVehicleNum());
|
||||
DeviceVO vo = deviceService.selectDeviceBySn(fault.getVehicleCode());
|
||||
ServiceUtil.assertion(vo==null,"当前设备不存在");
|
||||
return faultMapper.insertFault(fault);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ public class FaultController extends BaseController
|
|||
startPage();
|
||||
startOrderBy();
|
||||
query.setScope(true);
|
||||
query.setStoreId(getUserId());
|
||||
List<FaultVO> list = faultService.selectFaultList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user