报损管理
This commit is contained in:
@ -1,6 +1,10 @@
|
|||||||
package com.ruoyi.operation.controller;
|
package com.ruoyi.operation.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.operation.domain.Company;
|
||||||
|
import com.ruoyi.operation.service.ICompanyService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@ -33,11 +37,15 @@ public class ZcCarDamageController extends BaseController
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IZcCarDamageService zcCarDamageService;
|
private IZcCarDamageService zcCarDamageService;
|
||||||
|
@Autowired
|
||||||
|
private ICompanyService companyService;
|
||||||
|
|
||||||
@RequiresPermissions("operation:carDamage:view")
|
@RequiresPermissions("operation:carDamage:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String carDamage()
|
public String carDamage(ModelMap mmap)
|
||||||
{
|
{
|
||||||
|
List<Company> companyList = companyService.getCompanyList(new Company(),getSysUser()); // 获取运营商列表
|
||||||
|
mmap.put("companyList", companyList); // 将运营商列表传递到前端
|
||||||
return prefix + "/carDamage";
|
return prefix + "/carDamage";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,6 +58,10 @@ public class ZcCarDamageController extends BaseController
|
|||||||
public TableDataInfo list(ZcCarDamage zcCarDamage)
|
public TableDataInfo list(ZcCarDamage zcCarDamage)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
|
// 运营者账号,只能查询所属商户数据
|
||||||
|
if(UserConstants.USER_TYPE_02 .equals(getSysUser().getUserType())){
|
||||||
|
zcCarDamage.setOperatorId(getSysUser().getGroupId());
|
||||||
|
}
|
||||||
List<ZcCarDamage> list = zcCarDamageService.selectZcCarDamageList(zcCarDamage);
|
List<ZcCarDamage> list = zcCarDamageService.selectZcCarDamageList(zcCarDamage);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
@ -63,6 +75,10 @@ public class ZcCarDamageController extends BaseController
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult export(ZcCarDamage zcCarDamage)
|
public AjaxResult export(ZcCarDamage zcCarDamage)
|
||||||
{
|
{
|
||||||
|
// 运营者账号,只能查询所属商户数据
|
||||||
|
if(UserConstants.USER_TYPE_02 .equals(getSysUser().getUserType())){
|
||||||
|
zcCarDamage.setOperatorId(getSysUser().getGroupId());
|
||||||
|
}
|
||||||
List<ZcCarDamage> list = zcCarDamageService.selectZcCarDamageList(zcCarDamage);
|
List<ZcCarDamage> list = zcCarDamageService.selectZcCarDamageList(zcCarDamage);
|
||||||
ExcelUtil<ZcCarDamage> util = new ExcelUtil<ZcCarDamage>(ZcCarDamage.class);
|
ExcelUtil<ZcCarDamage> util = new ExcelUtil<ZcCarDamage>(ZcCarDamage.class);
|
||||||
return util.exportExcel(list, "车辆报损记录数据");
|
return util.exportExcel(list, "车辆报损记录数据");
|
||||||
|
|||||||
@ -83,8 +83,9 @@ public class ZcCarDamage extends BaseEntity
|
|||||||
|
|
||||||
/** 扩展字段3 */
|
/** 扩展字段3 */
|
||||||
private String extend3;
|
private String extend3;
|
||||||
|
/** 所属运营商ID */
|
||||||
|
private Long operatorId;
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
@ -230,6 +231,22 @@ public class ZcCarDamage extends BaseEntity
|
|||||||
this.zcCar = zcCar;
|
this.zcCar = zcCar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getOperatorId() {
|
||||||
|
return operatorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperatorId(Long operatorId) {
|
||||||
|
this.operatorId = operatorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStoreName() {
|
||||||
|
return storeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoreName(String storeName) {
|
||||||
|
this.storeName = storeName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|||||||
@ -50,19 +50,21 @@
|
|||||||
<select id="selectZcCarDamageList" parameterType="ZcCarDamage" resultMap="ZcCarDamageResult">
|
<select id="selectZcCarDamageList" parameterType="ZcCarDamage" resultMap="ZcCarDamageResult">
|
||||||
<include refid="selectZcCarDamageVo"/>
|
<include refid="selectZcCarDamageVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="carId != null "> and car_id = #{carId}</if>
|
<if test="carId != null "> and a.car_id = #{carId}</if>
|
||||||
<if test="damageType != null and damageType != ''"> and damage_type = #{damageType}</if>
|
<if test="damageType != null and damageType != ''"> and a.damage_type = #{damageType}</if>
|
||||||
<if test="damageReason != null and damageReason != ''"> and damage_reason = #{damageReason}</if>
|
<if test="damageReason != null and damageReason != ''"> and a.damage_reason = #{damageReason}</if>
|
||||||
<if test="submitterName != null and submitterName != ''"> and submitter_name like concat('%', #{submitterName}, '%')</if>
|
<if test="submitterName != null and submitterName != ''"> and a.submitter_name like concat('%', #{submitterName}, '%')</if>
|
||||||
<if test="submitTime != null "> and submit_time = #{submitTime}</if>
|
<if test="submitTime != null "> and a.submit_time = #{submitTime}</if>
|
||||||
<if test="damageStatus != null "> and damage_status = #{damageStatus}</if>
|
<if test="damageStatus != null "> and a.damage_status = #{damageStatus}</if>
|
||||||
<if test="auditorName != null and auditorName != ''"> and auditor_name like concat('%', #{auditorName}, '%')</if>
|
<if test="auditorName != null and auditorName != ''"> and a.auditor_name like concat('%', #{auditorName}, '%')</if>
|
||||||
<if test="auditTime != null "> and audit_time = #{auditTime}</if>
|
<if test="auditTime != null "> and a.audit_time = #{auditTime}</if>
|
||||||
<if test="auditComment != null and auditComment != ''"> and audit_comment = #{auditComment}</if>
|
<if test="auditComment != null and auditComment != ''"> and a.audit_comment = #{auditComment}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and a.status = #{status}</if>
|
||||||
<if test="extend1 != null and extend1 != ''"> and extend1 = #{extend1}</if>
|
<if test="extend1 != null and extend1 != ''"> and a.extend1 = #{extend1}</if>
|
||||||
<if test="extend2 != null and extend2 != ''"> and extend2 = #{extend2}</if>
|
<if test="extend2 != null and extend2 != ''"> and a.extend2 = #{extend2}</if>
|
||||||
<if test="extend3 != null and extend3 != ''"> and extend3 = #{extend3}</if>
|
<if test="extend3 != null and extend3 != ''"> and a.extend3 = #{extend3}</if>
|
||||||
|
<if test="operatorId != null "> and c.operator_id = #{operatorId}</if>
|
||||||
|
<if test="storeName != null "> and c.store_name = #{storeName}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,17 @@
|
|||||||
<form id="formId">
|
<form id="formId">
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>所属运营商:</label>
|
||||||
|
<select name="operatorId" id="operatorId" >
|
||||||
|
<option value="">请选择所属运营商</option>
|
||||||
|
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>所属门店:</label>
|
||||||
|
<input type="text" name="storeName"/>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>报损类型:</label>
|
<label>报损类型:</label>
|
||||||
<select name="damageType" th:with="type=${@dict.getType('key_car_damage_type')}">
|
<select name="damageType" th:with="type=${@dict.getType('key_car_damage_type')}">
|
||||||
|
|||||||
Reference in New Issue
Block a user