标签查询
This commit is contained in:
parent
43c2c01c7b
commit
cce535a7c1
|
|
@ -280,4 +280,7 @@ public class LeaseApplyInfo extends BaseEntity{
|
|||
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private Long maId;
|
||||
|
||||
@ApiModelProperty(value = "发布批次")
|
||||
private String publishTask;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,4 +99,7 @@ public class LeaseOutDetails extends BaseEntity {
|
|||
|
||||
/** 类型名称 */
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "发布批次")
|
||||
private String publishTask;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,10 +625,8 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
@Override
|
||||
public LeaseApplyRequestVo getDetailsById(LeaseApplyInfo leaseApplyInfo) {
|
||||
try {
|
||||
/*LeaseApplyInfo applyInfo = new LeaseApplyInfo();
|
||||
leaseApplyInfo.setId(leaseApplyInfo.getId());
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
applyInfo.setUserId(userId);*/
|
||||
leaseApplyInfo.setUserId(userId);
|
||||
Optional<LeaseApplyInfo> optionalInfo = Optional.ofNullable(mapper.selectLeaseApplyInfoById(leaseApplyInfo));
|
||||
LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo();
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,21 @@ public class MachineController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子标签编码查询
|
||||
* @param machine
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "电子标签编码查询")
|
||||
@GetMapping("/getByMaCode")
|
||||
public AjaxResult getByMaCode(Machine machine) {
|
||||
try {
|
||||
return success(machineService.getByMaCode(machine));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据标签信息查询出库单
|
||||
* @param leaseApplyInfo
|
||||
|
|
|
|||
|
|
@ -127,4 +127,11 @@ public interface MachineMapper
|
|||
* @return
|
||||
*/
|
||||
Machine selectHouse(Machine dto);
|
||||
|
||||
/**
|
||||
* 电子标签编码查询
|
||||
* @param machine
|
||||
* @return
|
||||
*/
|
||||
List<Machine> getByMaCode(Machine machine);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,4 +92,11 @@ public interface IMachineService
|
|||
* @return
|
||||
*/
|
||||
LeaseApplyRequestVo getInfoByMaId(LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
/**
|
||||
* 电子标签编码查询
|
||||
* @param machine
|
||||
* @return
|
||||
*/
|
||||
List<Machine> getByMaCode(Machine machine);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -247,4 +247,14 @@ public class MachineServiceImpl implements IMachineService
|
|||
throw new RuntimeException("Failed to select lease apply info", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子标签编码查询
|
||||
* @param machine
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Machine> getByMaCode(Machine machine) {
|
||||
return machineMapper.getByMaCode(machine);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="carCode!= null">
|
||||
car_code,
|
||||
</if>
|
||||
<if test="publishTask != null and publishTask != ''">
|
||||
publish_task,
|
||||
</if>
|
||||
create_time,
|
||||
update_time
|
||||
</trim>
|
||||
|
|
@ -141,6 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="carCode!= null">
|
||||
#{carCode},
|
||||
</if>
|
||||
<if test="publishTask != null and publishTask != ''">
|
||||
#{publishTask},
|
||||
</if>
|
||||
NOW(),
|
||||
NOW()
|
||||
</trim>
|
||||
|
|
|
|||
|
|
@ -732,6 +732,9 @@
|
|||
GROUP BY
|
||||
mt.type_id
|
||||
) AS subquery0 ON subquery0.type_id = mt.type_id
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_keeper mtk ON mtk.type_id = lad.type_id AND mtk.user_id = #{userId}
|
||||
</if>
|
||||
WHERE
|
||||
lad.parent_id = #{id}
|
||||
</select>
|
||||
|
|
@ -769,6 +772,9 @@
|
|||
and sda.dict_type = 'lease_task_status'
|
||||
left join ma_type mt on lad.type_id = mt.type_id and mt.del_flag = '0'
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_keeper mtk ON mtk.type_id = lad.type_id AND mtk.user_id = #{userId}
|
||||
</if>
|
||||
where tt.task_type = '19'
|
||||
and tt.task_status in (1, 2, 3)
|
||||
<if test="taskId != null ">and lai.task_id = #{taskId}</if>
|
||||
|
|
|
|||
|
|
@ -459,6 +459,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.type_id = #{typeId}
|
||||
</select>
|
||||
|
||||
<select id="getByMaCode" resultType="com.bonus.material.ma.domain.Machine">
|
||||
SELECT
|
||||
mm.ma_id as maId,
|
||||
mt2.type_name as materialName,
|
||||
mt.type_name as materialModel,
|
||||
mm.ma_code as maCode
|
||||
FROM
|
||||
ma_machine mm
|
||||
LEFT JOIN ma_type mt on mt.type_id=mm.type_id
|
||||
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
|
||||
WHERE
|
||||
mm.ma_status = '2' and
|
||||
mm.ma_code like concat('%', #{maCode}, '%')
|
||||
</select>
|
||||
|
||||
<delete id="deleteMachineByMaCodeAndTypeId">
|
||||
delete from ma_machine where ma_code = #{maCode} and type_id = #{typeId}
|
||||
and ma_status = '0'
|
||||
|
|
|
|||
Loading…
Reference in New Issue