配件申请单子项可以搜索、可以设置给不给保险公司看

This commit is contained in:
xiaofajia 2024-11-18 16:15:44 +08:00
parent 9bb6c0b201
commit d3af983873
5 changed files with 69 additions and 1 deletions

View File

@ -181,5 +181,19 @@ public class DlTicketWaresController {
public CommonResult<?> getById(@RequestParam("id") String id){
return success(dlTicketWaresService.getById(id));
}
/**
* 修改是否传给保险公司
*
* @author 小李
* @date 15:48 2024/11/18
* @param respVO 对象
**/
@PostMapping("/updateSafe")
@Operation(summary = "修改是否传给保险公司")
public CommonResult<?> updateSafe(@RequestBody DlTicketWaresRespVO respVO){
dlTicketWaresService.updateSafe(respVO);
return CommonResult.ok();
}
}

View File

@ -68,4 +68,16 @@ public class DlTicketWares extends TenantBaseDO {
/** 多个图片地址,英文逗号分隔(拍照上传配件申请单时用) */
private String images;
/** 是否传给保险公司(字典yes_no1:是0:否默认0) */
private String toSafe;
/** 保险公司名称 */
private String safeName;
/** 保险公司联系人 */
private String safeContact;
/** 保险公司联系电话 */
private String safeMobile;
}

View File

@ -104,4 +104,13 @@ public interface DlTicketWaresService extends IService<DlTicketWares> {
* @date 15:38 2024/10/22
**/
Map<String,Integer> getWorkerTodo();
/**
* 修改是否传给保险公司
*
* @author 小李
* @date 15:48 2024/11/18
* @param respVO 对象
**/
void updateSafe(DlTicketWaresRespVO respVO);
}

View File

@ -37,6 +37,7 @@ import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Lazy;
@ -627,6 +628,30 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
return rtnMap;
}
/**
* 修改是否传给保险公司
*
* @author 小李
* @date 15:48 2024/11/18
* @param respVO 对象
**/
@Override
public void updateSafe(DlTicketWaresRespVO respVO){
// 先取出状态
String toSafe = respVO.getToSafe();
// 准备更新条件
LambdaUpdateWrapper<DlTicketWares> lambdaUpdate = Wrappers.lambdaUpdate(DlTicketWares.class);
lambdaUpdate.eq(DlTicketWares::getId, respVO.getId());
lambdaUpdate.set(DlTicketWares::getToSafe, respVO.getToSafe());
// 根据状态更新
if (toSafe.equals("1")){
lambdaUpdate.set(DlTicketWares::getSafeName, respVO.getSafeName());
lambdaUpdate.set(DlTicketWares::getSafeContact, respVO.getSafeContact());
lambdaUpdate.set(DlTicketWares::getSafeMobile, respVO.getSafeMobile());
}
// 更新
baseMapper.update(lambdaUpdate);
}
}

View File

@ -22,6 +22,10 @@
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" />
<result property="images" column="images" />
<result property="toSafe" column="to_safe" />
<result property="safeName" column="safe_name" />
<result property="safeContact" column="safe_contact" />
<result property="safeMobile" column="safe_mobile" />
</resultMap>
<sql id="Base_SQL">
@ -42,7 +46,11 @@
dtw.status,
dtw.remark,
dtw.create_time,
dtw.images
dtw.images,
dtw.to_safe,
dtw.safe_name,
dtw.safe_contact,
dtw.safe_mobile
from dl_ticket_wares dtw
left join dl_repair_tickets drt
on dtw.ticket_id = drt.id