Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b781f676cd
|
|
@ -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.*;
|
||||||
|
|
||||||
|
|
@ -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();
|
||||||
|
|
@ -92,4 +93,18 @@ public class MaReceiveController extends BaseController {
|
||||||
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,4 +87,7 @@ public class DataReceiveDetail {
|
||||||
|
|
||||||
@ApiModelProperty(value = "接收人")
|
@ApiModelProperty(value = "接收人")
|
||||||
private String userIds;
|
private String userIds;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租赁商城装备id")
|
||||||
|
private Long itemId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,8 @@ public interface MaReceiveMapper {
|
||||||
List<DataReceiveDetail> getDateReceiveMachine(DataReceiveDetail dataReceiveDetail);
|
List<DataReceiveDetail> getDateReceiveMachine(DataReceiveDetail dataReceiveDetail);
|
||||||
|
|
||||||
int updateInfoStatus(@Param("id") Integer id);
|
int updateInfoStatus(@Param("id") Integer id);
|
||||||
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,4 +129,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 maReceiveMapper.selectMaMachineByItemId(itemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer updateItemStatus(Long itemId) {
|
||||||
|
return maReceiveMapper.updateItemStatus(itemId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SET receive_status = 1
|
SET receive_status = 1
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</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>
|
||||||
<select id="getDataReceive" resultType="com.bonus.sgzb.base.domain.DataReceiveInfo">
|
<select id="getDataReceive" resultType="com.bonus.sgzb.base.domain.DataReceiveInfo">
|
||||||
select * from data_receive_info where 1=1
|
select * from data_receive_info where 1=1
|
||||||
<if test="receiveStatus != null">
|
<if test="receiveStatus != null">
|
||||||
|
|
@ -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}
|
||||||
|
|
@ -85,4 +92,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getDataReceiveDetailsById" resultType="com.bonus.sgzb.base.domain.DataReceiveDetail">
|
<select id="getDataReceiveDetailsById" resultType="com.bonus.sgzb.base.domain.DataReceiveDetail">
|
||||||
SELECT * FROM data_receive_detail WHERE receive_id = #{receiveId}
|
SELECT * FROM data_receive_detail WHERE receive_id = #{receiveId}
|
||||||
</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>
|
||||||
Loading…
Reference in New Issue