BUG修复

This commit is contained in:
luolm 2025-02-20 22:30:39 +08:00
parent e41216f9c4
commit 0965ba1b2d
2 changed files with 21 additions and 7 deletions

View File

@ -15,6 +15,7 @@ import com.nflg.mobilebroken.common.pojo.ApiResult;
import com.nflg.mobilebroken.common.pojo.PageData;
import com.nflg.mobilebroken.common.pojo.vo.CqmPersonVO;
import com.nflg.mobilebroken.common.util.AdminUserUtil;
import com.nflg.mobilebroken.common.util.VUtils;
import com.nflg.mobilebroken.repository.entity.ParamConfig;
import com.nflg.mobilebroken.repository.entity.TBaseDeviceType;
import com.nflg.mobilebroken.repository.service.IParamConfigService;
@ -105,4 +106,15 @@ public class DeviceTypeController extends ControllerBase {
return ApiResult.success(baseDeviceTypeService.getCqmPersonList(cqms));
}
/**
* 删除
* @return
*/
@PostMapping("del")
@ApiMark(moduleName = "设备类型管理", apiName = "删除")
public ApiResult<Boolean> del(@RequestBody List<Long> ids){
VUtils.trueThrow(CollUtil.isEmpty(ids)).throwMessage(STATE.ParamErr,"请选择要删除的数据");
return ApiResult.success(baseDeviceTypeService.removeBatchByIds(ids));
}
}

View File

@ -12,27 +12,29 @@
</select>
<sql id="whr">
<if test="query.deviceNo!=null and query.deviceNo!=''">
and device_no=#{query.deviceNo}
and a.device_no=#{query.deviceNo}
</if>
<if test="query.customerName!=null and query.customerName!=''">
and customer_name=#{query.customerName}
and a.customer_name=#{query.customerName}
</if>
<if test="query.agentName!=null and query.agentName!=''">
and agent_name=#{query.agentName}
and a.agent_name=#{query.agentName}
</if>
<if test="query.modelNo!=null and query.modelNo!=''">
and model_no=#{query.modelNo}
and a.model_no=#{query.modelNo}
</if>
<if test="query.warrantyState!=null and query.warrantyState!=''">
and warranty_state=#{query.warrantyState}
and a.warranty_state=#{query.warrantyState}
</if>
<if test="query.warrantyStartDate!=null and query.warrantyStartDate!=''">
and start_warranty_date &gt;= #{query.warrantyStartDate} and start_warranty_date &lt;= #{query.warrantyEndDate}
and a.start_warranty_date &gt;= #{query.warrantyStartDate} and start_warranty_date &lt;= #{query.warrantyEndDate}
</if>
</sql>
<select id="getList" resultType="com.nflg.mobilebroken.repository.entity.Device">
select * from device where data_valid_state=1
select a.id, device_no, device_name, device_type, device_type_sub, model_no, customer_id, customer_name, device_state, agent_code, agent_name, shipment_date, warranty_state, start_warranty_date, warranty_month, data_valid_state, source_from, create_by, create_time, update_by, update_time, remark ,b.area_code ,b.area_name from device a
left join t_base_customer b on a.agent_code=b.agency_company_code
where data_valid_state=1
<include refid="whr"/>
</select>