Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
39ad23571f
|
|
@ -9,6 +9,7 @@ import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
@ -29,9 +30,9 @@ public class MaReceiveController extends BaseController {
|
||||||
private MaReceiveService maReceiveService;
|
private MaReceiveService maReceiveService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据推送接收
|
* 接收租赁推送的数据
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取推送数据")
|
@ApiOperation(value = "接收租赁推送的数据")
|
||||||
@PostMapping("/dataReceive")
|
@PostMapping("/dataReceive")
|
||||||
public AjaxResult getProjectInfoAll(@RequestBody String maMachineRequest) {
|
public AjaxResult getProjectInfoAll(@RequestBody String maMachineRequest) {
|
||||||
if (StringUtils.isEmpty(maMachineRequest)) {
|
if (StringUtils.isEmpty(maMachineRequest)) {
|
||||||
|
|
@ -46,7 +47,7 @@ public class MaReceiveController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "获取推送数据")
|
@ApiOperation(value = "查询推送数据")
|
||||||
@GetMapping("/getDataReceive")
|
@GetMapping("/getDataReceive")
|
||||||
public TableDataInfo getDataReceive(DataReceiveInfo dataReceiveInfo) {
|
public TableDataInfo getDataReceive(DataReceiveInfo dataReceiveInfo) {
|
||||||
startPage();
|
startPage();
|
||||||
|
|
@ -85,11 +86,25 @@ public class MaReceiveController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "数据接收")
|
@ApiOperation(value = "查看数据接收详情")
|
||||||
@GetMapping("/getDateReceiveMachine")
|
@GetMapping("/getDateReceiveMachine")
|
||||||
public TableDataInfo getDateReceiveMachine(DataReceiveDetail dataReceiveDetail) {
|
public TableDataInfo getDateReceiveMachine(DataReceiveDetail dataReceiveDetail) {
|
||||||
startPage();
|
startPage();
|
||||||
List<DataReceiveDetail> dateReceiveMachine = maReceiveService.getDateReceiveMachine(dataReceiveDetail);
|
List<DataReceiveDetail> dateReceiveMachine = maReceiveService.getDateReceiveMachine(dataReceiveDetail);
|
||||||
return getDataTable(dateReceiveMachine);
|
return getDataTable(dateReceiveMachine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取租赁设备状态")
|
||||||
|
@GetMapping("/getItemStatus")
|
||||||
|
public AjaxResult getDataReceiveDetailsById(Long itemId) {
|
||||||
|
Long itemStatus = maReceiveService.getItemStatus(itemId);
|
||||||
|
return success(itemStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改租赁设备状态")
|
||||||
|
@GetMapping("/updateItemStatus")
|
||||||
|
public AjaxResult updateItemStatus(Long itemId) {
|
||||||
|
Integer itemStatus = maReceiveService.updateItemStatus(itemId);
|
||||||
|
return success(itemStatus);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:liang.chao
|
* @Author:liang.chao
|
||||||
|
|
@ -41,6 +42,11 @@ public class DataReceiveDetail {
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date rentTime;
|
private Date rentTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租赁结束日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date orderOverTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "租赁价格")
|
@ApiModelProperty(value = "租赁价格")
|
||||||
private String rentPrice;
|
private String rentPrice;
|
||||||
|
|
||||||
|
|
@ -77,6 +83,18 @@ public class DataReceiveDetail {
|
||||||
@ApiModelProperty(value = "机手姓名")
|
@ApiModelProperty(value = "机手姓名")
|
||||||
private String maUserName;
|
private String maUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机手电话")
|
||||||
|
private String maUserPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机手身份证号")
|
||||||
|
private String maUserIdCard;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机手性别(0女 1男)")
|
||||||
|
private Integer maUserSex;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机手年龄")
|
||||||
|
private Integer maUserAge;
|
||||||
|
|
||||||
@ApiModelProperty(value = "关键字")
|
@ApiModelProperty(value = "关键字")
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
|
||||||
|
|
@ -87,4 +105,10 @@ public class DataReceiveDetail {
|
||||||
|
|
||||||
@ApiModelProperty(value = "接收人")
|
@ApiModelProperty(value = "接收人")
|
||||||
private String userIds;
|
private String userIds;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租赁商城装备id")
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机手附件信息")
|
||||||
|
private List<EnterpriseDriverFile> enterpriseDriverFile;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.bonus.sgzb.base.domain;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class EnterpriseDriverFile {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "推送详情id")
|
||||||
|
private Integer receiveDetailId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "附件名称")
|
||||||
|
private String file_name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "附件地址")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "附件类型(0反面,1正面,2持证信息)")
|
||||||
|
private Integer fileType;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.bonus.sgzb.base.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.bonus.sgzb.base.domain.EnterpriseDriverFile;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface EnterpriseDriverFileMapper {
|
||||||
|
void insertEnterpriseDriverFile(EnterpriseDriverFile enterpriseDriverFile);
|
||||||
|
|
||||||
|
List<EnterpriseDriverFile> selectEnterpriseDriverFileByReceiveDetailId(Integer id);
|
||||||
|
}
|
||||||
|
|
@ -48,4 +48,8 @@ public interface MaMachineMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateNum(long typeId);
|
int updateNum(long typeId);
|
||||||
|
|
||||||
|
Long selectMaMachineByItemId(Long itemId);
|
||||||
|
|
||||||
|
Integer updateItemStatus(Long itemId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,8 @@ public interface MaReceiveService {
|
||||||
int saveMachine(DataReceiveInfo dataReceiveInfo);
|
int saveMachine(DataReceiveInfo dataReceiveInfo);
|
||||||
|
|
||||||
List<DataReceiveDetail> getDateReceiveMachine(DataReceiveDetail dataReceiveDetail);
|
List<DataReceiveDetail> getDateReceiveMachine(DataReceiveDetail dataReceiveDetail);
|
||||||
|
|
||||||
|
Long getItemStatus(Long itemId);
|
||||||
|
|
||||||
|
Integer updateItemStatus(Long itemId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||||
import com.bonus.sgzb.base.domain.DataReceiveDetail;
|
import com.bonus.sgzb.base.domain.DataReceiveDetail;
|
||||||
import com.bonus.sgzb.base.domain.DataReceiveInfo;
|
import com.bonus.sgzb.base.domain.DataReceiveInfo;
|
||||||
|
import com.bonus.sgzb.base.domain.EnterpriseDriverFile;
|
||||||
|
import com.bonus.sgzb.base.mapper.EnterpriseDriverFileMapper;
|
||||||
import com.bonus.sgzb.base.mapper.MaMachineMapper;
|
import com.bonus.sgzb.base.mapper.MaMachineMapper;
|
||||||
import com.bonus.sgzb.base.mapper.MaReceiveMapper;
|
import com.bonus.sgzb.base.mapper.MaReceiveMapper;
|
||||||
import com.bonus.sgzb.base.mapper.MaTypeMapper;
|
import com.bonus.sgzb.base.mapper.MaTypeMapper;
|
||||||
|
|
@ -34,6 +36,9 @@ public class MaReceiveServiceImpl implements MaReceiveService {
|
||||||
@Resource
|
@Resource
|
||||||
private MaTypeMapper maTypeMapper;
|
private MaTypeMapper maTypeMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EnterpriseDriverFileMapper enterpriseDriverFileMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int saveDataReceiveInfo(String maMachineRequest) {
|
public int saveDataReceiveInfo(String maMachineRequest) {
|
||||||
|
|
@ -60,10 +65,19 @@ public class MaReceiveServiceImpl implements MaReceiveService {
|
||||||
@Transactional
|
@Transactional
|
||||||
public int saveDataReceiveDetails(DataReceiveDetail dataReceiveDetail) {
|
public int saveDataReceiveDetails(DataReceiveDetail dataReceiveDetail) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
//保存推送详情
|
||||||
i = maReceiveMapper.saveDataReceiveDetails(dataReceiveDetail);
|
i = maReceiveMapper.saveDataReceiveDetails(dataReceiveDetail);
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
throw new RuntimeException("保存失败");
|
throw new RuntimeException("保存失败");
|
||||||
}
|
}
|
||||||
|
//保存机手附件信息
|
||||||
|
List<EnterpriseDriverFile> enterpriseDriverFileList = dataReceiveDetail.getEnterpriseDriverFile();
|
||||||
|
if (enterpriseDriverFileList != null && !enterpriseDriverFileList.isEmpty()){
|
||||||
|
for (EnterpriseDriverFile enterpriseDriverFile : enterpriseDriverFileList) {
|
||||||
|
enterpriseDriverFile.setReceiveDetailId(dataReceiveDetail.getId());
|
||||||
|
enterpriseDriverFileMapper.insertEnterpriseDriverFile(enterpriseDriverFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,7 +96,11 @@ public class MaReceiveServiceImpl implements MaReceiveService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DataReceiveDetail> getDataReceiveDetails(DataReceiveDetail dataReceiveDetail) {
|
public List<DataReceiveDetail> getDataReceiveDetails(DataReceiveDetail dataReceiveDetail) {
|
||||||
return maReceiveMapper.getDataReceiveDetails(dataReceiveDetail);
|
List<DataReceiveDetail> dataReceiveDetails = maReceiveMapper.getDataReceiveDetails(dataReceiveDetail);
|
||||||
|
dataReceiveDetails.forEach(dataReceiveDetail1 -> {
|
||||||
|
dataReceiveDetail1.setEnterpriseDriverFile(enterpriseDriverFileMapper.selectEnterpriseDriverFileByReceiveDetailId(dataReceiveDetail1.getId()));
|
||||||
|
});
|
||||||
|
return dataReceiveDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -129,4 +147,14 @@ public class MaReceiveServiceImpl implements MaReceiveService {
|
||||||
List<DataReceiveDetail> dateReceiveMachine = maReceiveMapper.getDateReceiveMachine(dataReceiveDetail);
|
List<DataReceiveDetail> dateReceiveMachine = maReceiveMapper.getDateReceiveMachine(dataReceiveDetail);
|
||||||
return dateReceiveMachine;
|
return dateReceiveMachine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getItemStatus(Long itemId) {
|
||||||
|
return maMachineMapper.selectMaMachineByItemId(itemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer updateItemStatus(Long itemId) {
|
||||||
|
return maMachineMapper.updateItemStatus(itemId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,7 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,24 +91,32 @@ public class MaTypeServiceImpl implements ITypeService {
|
||||||
typeFileMapper.insertMaTypeFile(typeFile1);
|
typeFileMapper.insertMaTypeFile(typeFile1);
|
||||||
}
|
}
|
||||||
// 库管员配置
|
// 库管员配置
|
||||||
MaTypeKeeper typeKeeper = new MaTypeKeeper();
|
if (Objects.nonNull(maType.getKeeperUserId())) {
|
||||||
typeKeeper.setUserId(maType.getKeeperUserId());
|
MaTypeKeeper typeKeeper = new MaTypeKeeper();
|
||||||
typeKeeper.setTypeId(typeId);
|
typeKeeper.setUserId(maType.getKeeperUserId());
|
||||||
typeKeeper.setCreateTime(DateUtils.getNowDate());
|
typeKeeper.setTypeId(typeId);
|
||||||
maTypeMapper.insertKeeper(typeKeeper);
|
typeKeeper.setCreateTime(DateUtils.getNowDate());
|
||||||
|
maTypeMapper.insertKeeper(typeKeeper);
|
||||||
|
}
|
||||||
|
|
||||||
// 维修员配置
|
// 维修员配置
|
||||||
MaTypeRepair typeRepair = new MaTypeRepair();
|
if (Objects.nonNull(maType.getRepairUserId())) {
|
||||||
typeRepair.setUserId(maType.getRepairUserId());
|
MaTypeRepair typeRepair = new MaTypeRepair();
|
||||||
typeRepair.setTypeId(typeId);
|
typeRepair.setUserId(maType.getRepairUserId());
|
||||||
typeRepair.setCreateTime(DateUtils.getNowDate());
|
typeRepair.setTypeId(typeId);
|
||||||
maTypeMapper.insertRepair(typeRepair);
|
typeRepair.setCreateTime(DateUtils.getNowDate());
|
||||||
|
maTypeMapper.insertRepair(typeRepair);
|
||||||
|
}
|
||||||
|
|
||||||
// 资产属性配置
|
// 资产属性配置
|
||||||
MaPropSet propSet = new MaPropSet();
|
if (maType.getPropId() > 0) {
|
||||||
propSet.setTypeId(typeId);
|
MaPropSet propSet = new MaPropSet();
|
||||||
propSet.setPropId(maType.getPropId());
|
propSet.setTypeId(typeId);
|
||||||
propSet.setCreateTime(DateUtils.getNowDate());
|
propSet.setPropId(maType.getPropId());
|
||||||
maTypeMapper.insertMaPropSet(propSet);
|
propSet.setCreateTime(DateUtils.getNowDate());
|
||||||
|
maTypeMapper.insertMaPropSet(propSet);
|
||||||
|
}
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -272,6 +272,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<update id="updateNum">
|
<update id="updateNum">
|
||||||
update ma_type set num = num - 1 where type_id = #{typeId}
|
update ma_type set num = num - 1 where type_id = #{typeId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateItemStatus">
|
||||||
|
UPDATE ma_machine mm LEFT JOIN data_receive_detail drd on mm.ma_id = drd.ma_id
|
||||||
|
SET mm.ma_status = 130
|
||||||
|
where drd.item_id = #{itemId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="remove" parameterType="Long">
|
<delete id="remove" parameterType="Long">
|
||||||
delete from ma_machine where ma_id in
|
delete from ma_machine where ma_id in
|
||||||
|
|
@ -311,7 +316,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where m.rfid_code = #{rfidCode}
|
where m.rfid_code = #{rfidCode}
|
||||||
</select>
|
</select>
|
||||||
<select id="getMaMachineByMaIdAndMaCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
<select id="getMaMachineByMaIdAndMaCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
||||||
select * from ma_machine where ma_id = #{maId} and ma_code = #{maCode}
|
select *
|
||||||
|
from ma_machine
|
||||||
|
where 1=1
|
||||||
|
<if test="maId != 0 "> and ma_id = #{maId}</if>
|
||||||
|
<if test="maCode != null and maCode != ''"> and ma_code = #{maCode}</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getMachineByQrCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
<select id="getMachineByQrCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
||||||
select m.ma_id, m.type_id, m.ma_code, m.pre_code, m.ma_status, dic.name maStatusName, m.qr_code, m.buy_price, msi.supplier as maVender, m.out_fac_time, m.out_fac_code,
|
select m.ma_id, m.type_id, m.ma_code, m.pre_code, m.ma_status, dic.name maStatusName, m.qr_code, m.buy_price, msi.supplier as maVender, m.out_fac_time, m.out_fac_code,
|
||||||
|
|
@ -365,4 +374,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getMaMachineByMaTypeAndMaCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
<select id="getMaMachineByMaTypeAndMaCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
||||||
select * from ma_machine where qr_code = #{qrCode} or ma_code = #{maCode}
|
select * from ma_machine where qr_code = #{qrCode} or ma_code = #{maCode}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectMaMachineByItemId" resultType="java.lang.Long">
|
||||||
|
|
||||||
|
SELECT mm.ma_status FROM ma_machine mm
|
||||||
|
left join data_receive_detail drd on mm.ma_id = drd.ma_id
|
||||||
|
WHERE drd.item_id = #{itemId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -8,9 +8,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
insert into data_receive_info(push_num,receive_date)
|
insert into data_receive_info(push_num,receive_date)
|
||||||
values(#{pushNum},now())
|
values(#{pushNum},now())
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="saveDataReceiveDetails">
|
<insert id="saveDataReceiveDetails" keyProperty="id" useGeneratedKeys="true">
|
||||||
insert into data_receive_detail(receive_id,check_code,check_unit,check_date,is_new,ma_id,ma_user_name,next_check_date,out_factory_time,rent_price,rent_time,supplier,type_id,unit_id)
|
insert into data_receive_detail(receive_id,check_code,check_unit,check_date,is_new,ma_id,
|
||||||
values(#{receiveId},#{checkCode},#{checkUnit},#{checkDate},#{isNew},#{maId},#{maUserName},#{nextCheckDate},#{outFactoryTime},#{rentPrice},#{rentTime},#{supplier},#{typeId},#{unitId})
|
ma_user_name,next_check_date,out_factory_time,rent_price,rent_time,
|
||||||
|
supplier,type_id,unit_id,order_over_time,ma_user_phone,ma_user_id_card,
|
||||||
|
ma_user_sex,ma_user_age)
|
||||||
|
values(#{receiveId},#{checkCode},#{checkUnit},#{checkDate},#{isNew},#{maId},#{maUserName},
|
||||||
|
#{nextCheckDate},#{outFactoryTime},#{rentPrice},#{rentTime},#{supplier},#{typeId},#{unitId},
|
||||||
|
#{orderOverTime},#{maUserPhone},#{maUserIdCard},#{maUserSex},#{maUserAge})
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateStatus">
|
<update id="updateStatus">
|
||||||
UPDATE data_receive_detail
|
UPDATE data_receive_detail
|
||||||
|
|
@ -38,12 +43,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
drd.*,
|
drd.*,
|
||||||
mt.type_name modelName,
|
mt.type_name modelName,
|
||||||
mt1.type_name typeName,
|
mt1.type_name typeName,
|
||||||
mt2.type_name machineName
|
mt2.type_name machineName,
|
||||||
|
mm.ma_status
|
||||||
FROM
|
FROM
|
||||||
data_receive_detail drd
|
data_receive_detail drd
|
||||||
LEFT JOIN ma_type mt ON drd.type_id = mt.type_id
|
LEFT JOIN ma_type mt ON drd.type_id = mt.type_id
|
||||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
|
||||||
|
LEFT JOIN ma_machine mm ON drd.ma_id = mm.ma_id
|
||||||
WHERE
|
WHERE
|
||||||
|
|
||||||
drd.receive_id = #{receiveId}
|
drd.receive_id = #{receiveId}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?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.bonus.sgzb.base.mapper.EnterpriseDriverFileMapper">
|
||||||
|
|
||||||
|
<insert id="insertEnterpriseDriverFile">
|
||||||
|
insert into base_enterprise_driver_file(receive_detail_id,file_name,file_url,file_type)
|
||||||
|
values(#{receiveDetailId},#{fileName},#{fileUrl},#{fileType})
|
||||||
|
</insert>
|
||||||
|
<select id="selectEnterpriseDriverFileByReceiveDetailId"
|
||||||
|
resultType="com.bonus.sgzb.base.domain.EnterpriseDriverFile">
|
||||||
|
select * from enterprise_driver_file where receive_detail_id = #{receiveDetailId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue