1.修改设备养护表及相关接口
parent
7c88ebc0de
commit
d219f3d78e
@ -0,0 +1,91 @@
|
|||||||
|
package com.glxp.api.admin.controller.inventory;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.admin.entity.inventory.DeviceMAOrderDetailEntity;
|
||||||
|
import com.glxp.api.admin.req.inventory.FilterDeviceMAOrderDetailRequest;
|
||||||
|
import com.glxp.api.admin.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.admin.res.inventory.DeviceMAOrderDetailResponse;
|
||||||
|
import com.glxp.api.admin.service.inventory.DeviceMAOrderDetailService;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备养护记录详情接口
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
public class DeviceMAOrderDetailCotroller {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeviceMAOrderDetailService deviceMAOrderDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备养护记录详情列表
|
||||||
|
*
|
||||||
|
* @param detailRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/device/MA/order/detail/filterList")
|
||||||
|
public BaseResponse filterList(FilterDeviceMAOrderDetailRequest detailRequest) {
|
||||||
|
List<DeviceMAOrderDetailResponse> list = deviceMAOrderDetailService.filterList(detailRequest);
|
||||||
|
PageInfo<DeviceMAOrderDetailResponse> pageInfo = new PageInfo<>(list);
|
||||||
|
PageSimpleResponse<DeviceMAOrderDetailResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||||
|
pageSimpleResponse.setList(list);
|
||||||
|
return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加设备养护记录详情
|
||||||
|
*
|
||||||
|
* @param detailEntity
|
||||||
|
* @param bindingResult
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/device/MA/order/detail/addOrderDetail")
|
||||||
|
public BaseResponse addOrderDetail(@RequestBody DeviceMAOrderDetailEntity detailEntity, BindingResult bindingResult) {
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
return deviceMAOrderDetailService.addDetail(detailEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新设备养护记录详情
|
||||||
|
*
|
||||||
|
* @param detailEntity
|
||||||
|
* @param bindingResult
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/device/MA/order/detail/updateOrderDetail")
|
||||||
|
public BaseResponse updateOrderDetail(@RequestBody DeviceMAOrderDetailEntity detailEntity, BindingResult bindingResult) {
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
return deviceMAOrderDetailService.updateDetail(detailEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设备养护记录详情
|
||||||
|
*
|
||||||
|
* @param detailEntity
|
||||||
|
* @param bindingResult
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/device/MA/order/detail/deleteOrderDetail")
|
||||||
|
public BaseResponse deleteOrderDetail(@RequestBody DeviceMAOrderDetailEntity detailEntity, BindingResult bindingResult) {
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
return deviceMAOrderDetailService.deleteDetail(detailEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.glxp.api.admin.req.inventory;
|
||||||
|
|
||||||
|
import com.glxp.api.admin.req.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备养护记录详情查询接口参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FilterDeviceMAOrderDetailRequest extends ListPageRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备养护记录号
|
||||||
|
*/
|
||||||
|
private String orderIdFk;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.glxp.api.admin.res.inventory;
|
||||||
|
|
||||||
|
import com.glxp.api.admin.entity.inventory.DeviceMAOrderDetailEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备养护记录详情响应结果
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DeviceMAOrderDetailResponse extends DeviceMAOrderDetailEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医疗器械注册人名称
|
||||||
|
*/
|
||||||
|
private String ylqxzcrbarmc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册证备案号
|
||||||
|
*/
|
||||||
|
private String zczbhhzbapzbh;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格型号
|
||||||
|
*/
|
||||||
|
private String ggxh;
|
||||||
|
|
||||||
|
}
|
@ -1,17 +0,0 @@
|
|||||||
package com.glxp.api.admin.res.inventory;
|
|
||||||
|
|
||||||
import com.glxp.api.admin.entity.inventory.DeviceMAOrderEntity;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备养护记录响应结果
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class DeviceMAOrderResponse extends DeviceMAOrderEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品名称
|
|
||||||
*/
|
|
||||||
private String productName;
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.glxp.api.admin.service.inventory;
|
||||||
|
|
||||||
|
import com.glxp.api.admin.entity.inventory.DeviceMAOrderDetailEntity;
|
||||||
|
import com.glxp.api.admin.req.inventory.FilterDeviceMAOrderDetailRequest;
|
||||||
|
import com.glxp.api.admin.res.inventory.DeviceMAOrderDetailResponse;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备养护记录详情Service
|
||||||
|
*/
|
||||||
|
public interface DeviceMAOrderDetailService {
|
||||||
|
|
||||||
|
List<DeviceMAOrderDetailResponse> filterList(FilterDeviceMAOrderDetailRequest detailRequest);
|
||||||
|
|
||||||
|
BaseResponse addDetail(DeviceMAOrderDetailEntity detailEntity);
|
||||||
|
|
||||||
|
BaseResponse updateDetail(DeviceMAOrderDetailEntity detailEntity);
|
||||||
|
|
||||||
|
|
||||||
|
BaseResponse deleteDetail(DeviceMAOrderDetailEntity detailEntity);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
package com.glxp.api.admin.service.inventory.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.glxp.api.admin.dao.inventory.DeviceMaOrderDetailDao;
|
||||||
|
import com.glxp.api.admin.entity.inventory.DeviceMAOrderDetailEntity;
|
||||||
|
import com.glxp.api.admin.req.inventory.FilterDeviceMAOrderDetailRequest;
|
||||||
|
import com.glxp.api.admin.res.inventory.DeviceMAOrderDetailResponse;
|
||||||
|
import com.glxp.api.admin.service.inventory.DeviceMAOrderDetailService;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import groovy.util.logging.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class DeviceMAOrderDetailServiceImpl implements DeviceMAOrderDetailService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeviceMaOrderDetailDao deviceMaOrderDetailDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeviceMAOrderDetailResponse> filterList(FilterDeviceMAOrderDetailRequest detailRequest) {
|
||||||
|
if (null == detailRequest) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
if (null != detailRequest.getPage() && null != detailRequest.getLimit()) {
|
||||||
|
PageHelper.offsetPage((detailRequest.getPage() - 1) * detailRequest.getLimit(), detailRequest.getLimit());
|
||||||
|
}
|
||||||
|
return deviceMaOrderDetailDao.filterList(detailRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaseResponse addDetail(DeviceMAOrderDetailEntity detailEntity) {
|
||||||
|
if (null == detailEntity) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
deviceMaOrderDetailDao.insert(detailEntity);
|
||||||
|
return ResultVOUtils.success("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaseResponse updateDetail(DeviceMAOrderDetailEntity detailEntity) {
|
||||||
|
if (null == detailEntity || null == detailEntity.getId()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
deviceMaOrderDetailDao.updateByPrimaryKey(detailEntity);
|
||||||
|
return ResultVOUtils.success("更新成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaseResponse deleteDetail(DeviceMAOrderDetailEntity detailEntity) {
|
||||||
|
if (null == detailEntity) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
if (null == detailEntity.getId() && StrUtil.isBlank(detailEntity.getOrderIdFk())) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
if (null != detailEntity.getId()) {
|
||||||
|
deviceMaOrderDetailDao.deleteByPrimaryKey(detailEntity.getId());
|
||||||
|
} else {
|
||||||
|
//删除整单数据
|
||||||
|
deviceMaOrderDetailDao.deleteByOrderId(detailEntity.getOrderIdFk());
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success("删除成功");
|
||||||
|
}
|
||||||
|
}
|
@ -1,249 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.glxp.api.admin.dao.inventory.DeviceMaOrderDao">
|
|
||||||
<resultMap id="BaseResultMap" type="com.glxp.api.admin.entity.inventory.DeviceMAOrderEntity">
|
|
||||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
|
||||||
<result column="orderId" jdbcType="VARCHAR" property="orderId"/>
|
|
||||||
<result column="code" jdbcType="VARCHAR" property="code"/>
|
|
||||||
<result column="productId" jdbcType="VARCHAR" property="productId"/>
|
|
||||||
<result column="batchNo" jdbcType="VARCHAR" property="batchNo"/>
|
|
||||||
<result column="produceDate" jdbcType="VARCHAR" property="produceDate"/>
|
|
||||||
<result column="expireDate" jdbcType="VARCHAR" property="expireDate"/>
|
|
||||||
<result column="serialNo" jdbcType="VARCHAR" property="serialNo"/>
|
|
||||||
<result column="createTime" jdbcType="VARCHAR" property="createTime"/>
|
|
||||||
<result column="updateTime" jdbcType="VARCHAR" property="updateTime"/>
|
|
||||||
<result column="deviceStatus" jdbcType="BOOLEAN" property="deviceStatus"/>
|
|
||||||
<result column="maintenanceStatus" jdbcType="BOOLEAN" property="maintenanceStatus"/>
|
|
||||||
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
||||||
<result column="status" jdbcType="BOOLEAN" property="status"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id,
|
|
||||||
orderId,
|
|
||||||
code,
|
|
||||||
productId,
|
|
||||||
batchNo,
|
|
||||||
produceDate,
|
|
||||||
expireDate,
|
|
||||||
serialNo,
|
|
||||||
createTime,
|
|
||||||
updateTime,
|
|
||||||
deviceStatus,
|
|
||||||
maintenanceStatus,
|
|
||||||
`createUser`,
|
|
||||||
remark,
|
|
||||||
`status`
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from device_ma_order
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete
|
|
||||||
from device_ma_order
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<insert id="insert" keyColumn="id" keyProperty="id"
|
|
||||||
parameterType="com.glxp.api.admin.entity.inventory.DeviceMAOrderEntity" useGeneratedKeys="true">
|
|
||||||
insert into device_ma_order (orderId, code, productId,
|
|
||||||
batchNo, produceDate, expireDate,
|
|
||||||
serialNo, createTime, updateTime,
|
|
||||||
deviceStatus, maintenanceStatus, `createUser`,
|
|
||||||
remark, `status`)
|
|
||||||
values (#{orderId,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR},
|
|
||||||
#{batchNo,jdbcType=VARCHAR}, #{produceDate,jdbcType=VARCHAR}, #{expireDate,jdbcType=VARCHAR},
|
|
||||||
#{serialNo,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR},
|
|
||||||
#{deviceStatus,jdbcType=BOOLEAN}, #{maintenanceStatus,jdbcType=BOOLEAN}, #{createUser,jdbcType=VARCHAR},
|
|
||||||
#{remark,jdbcType=VARCHAR}, #{status,jdbcType=BOOLEAN})
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id"
|
|
||||||
parameterType="com.glxp.api.admin.entity.inventory.DeviceMAOrderEntity" useGeneratedKeys="true">
|
|
||||||
insert into device_ma_order
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="orderId != null">
|
|
||||||
orderId,
|
|
||||||
</if>
|
|
||||||
<if test="code != null">
|
|
||||||
code,
|
|
||||||
</if>
|
|
||||||
<if test="productId != null">
|
|
||||||
productId,
|
|
||||||
</if>
|
|
||||||
<if test="batchNo != null">
|
|
||||||
batchNo,
|
|
||||||
</if>
|
|
||||||
<if test="produceDate != null">
|
|
||||||
produceDate,
|
|
||||||
</if>
|
|
||||||
<if test="expireDate != null">
|
|
||||||
expireDate,
|
|
||||||
</if>
|
|
||||||
<if test="serialNo != null">
|
|
||||||
serialNo,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
createTime,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
updateTime,
|
|
||||||
</if>
|
|
||||||
<if test="deviceStatus != null">
|
|
||||||
deviceStatus,
|
|
||||||
</if>
|
|
||||||
<if test="maintenanceStatus != null">
|
|
||||||
maintenanceStatus,
|
|
||||||
</if>
|
|
||||||
<if test="createUser != null">
|
|
||||||
`createUser`,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="status != null">
|
|
||||||
`status`,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="orderId != null">
|
|
||||||
#{orderId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="code != null">
|
|
||||||
#{code,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="productId != null">
|
|
||||||
#{productId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="batchNo != null">
|
|
||||||
#{batchNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="produceDate != null">
|
|
||||||
#{produceDate,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="expireDate != null">
|
|
||||||
#{expireDate,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="serialNo != null">
|
|
||||||
#{serialNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deviceStatus != null">
|
|
||||||
#{deviceStatus,jdbcType=BOOLEAN},
|
|
||||||
</if>
|
|
||||||
<if test="maintenanceStatus != null">
|
|
||||||
#{maintenanceStatus,jdbcType=BOOLEAN},
|
|
||||||
</if>
|
|
||||||
<if test="createUser != null">
|
|
||||||
#{createUser,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="status != null">
|
|
||||||
#{status,jdbcType=BOOLEAN},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.api.admin.entity.inventory.DeviceMAOrderEntity">
|
|
||||||
update device_ma_order
|
|
||||||
<set>
|
|
||||||
<if test="orderId != null">
|
|
||||||
orderId = #{orderId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="code != null">
|
|
||||||
code = #{code,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="productId != null">
|
|
||||||
productId = #{productId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="batchNo != null">
|
|
||||||
batchNo = #{batchNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="produceDate != null">
|
|
||||||
produceDate = #{produceDate,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="expireDate != null">
|
|
||||||
expireDate = #{expireDate,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="serialNo != null">
|
|
||||||
serialNo = #{serialNo,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
createTime = #{createTime,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
updateTime = #{updateTime,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deviceStatus != null">
|
|
||||||
deviceStatus = #{deviceStatus,jdbcType=BOOLEAN},
|
|
||||||
</if>
|
|
||||||
<if test="maintenanceStatus != null">
|
|
||||||
maintenanceStatus = #{maintenanceStatus,jdbcType=BOOLEAN},
|
|
||||||
</if>
|
|
||||||
<if test="createUser != null">
|
|
||||||
`createUser` = #{createUser,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="status != null">
|
|
||||||
`status` = #{status,jdbcType=BOOLEAN},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.glxp.api.admin.entity.inventory.DeviceMAOrderEntity">
|
|
||||||
update device_ma_order
|
|
||||||
set orderId = #{orderId,jdbcType=VARCHAR},
|
|
||||||
code = #{code,jdbcType=VARCHAR},
|
|
||||||
productId = #{productId,jdbcType=VARCHAR},
|
|
||||||
batchNo = #{batchNo,jdbcType=VARCHAR},
|
|
||||||
produceDate = #{produceDate,jdbcType=VARCHAR},
|
|
||||||
expireDate = #{expireDate,jdbcType=VARCHAR},
|
|
||||||
serialNo = #{serialNo,jdbcType=VARCHAR},
|
|
||||||
createTime = #{createTime,jdbcType=VARCHAR},
|
|
||||||
updateTime = #{updateTime,jdbcType=VARCHAR},
|
|
||||||
deviceStatus = #{deviceStatus,jdbcType=BOOLEAN},
|
|
||||||
maintenanceStatus = #{maintenanceStatus,jdbcType=BOOLEAN},
|
|
||||||
`createUser` = #{createUser,jdbcType=VARCHAR},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
`status` = #{status,jdbcType=BOOLEAN}
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="filterList" resultType="com.glxp.api.admin.res.inventory.DeviceMAOrderResponse">
|
|
||||||
select dmo.id,
|
|
||||||
dmo.orderId,
|
|
||||||
dmo.code,
|
|
||||||
dmo.productId,
|
|
||||||
dmo.batchNo,
|
|
||||||
dmo.produceDate,
|
|
||||||
dmo.expireDate,
|
|
||||||
dmo.serialNo,
|
|
||||||
dmo.createTime,
|
|
||||||
dmo.updateTime,
|
|
||||||
dmo.deviceStatus,
|
|
||||||
dmo.maintenanceStatus,
|
|
||||||
dmo.createUser,
|
|
||||||
dmo.remark,
|
|
||||||
dmo.status,
|
|
||||||
bp.cpmctymc productName
|
|
||||||
from device_ma_order dmo
|
|
||||||
left join basic_udirel bu on dmo.productId = bu.id
|
|
||||||
left join basic_products bp on bu.uuid = bp.uuid
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
Loading…
Reference in New Issue