|
@@ -64,6 +64,11 @@ public class MachineManageAction implements IMINAction {
|
|
|
* 编辑售货机二维码状态
|
|
|
*/
|
|
|
public final static String EDIT_MACHINE_CODE_STATE = "editMachineCodeState";
|
|
|
+ /**
|
|
|
+ * 编辑售货机货道
|
|
|
+ */
|
|
|
+ public final static String QUERY_PROEQUREL_MANAGE = "queryProEquRelManage";
|
|
|
+
|
|
|
|
|
|
private boolean contains;
|
|
|
|
|
@@ -103,8 +108,8 @@ public class MachineManageAction implements IMINAction {
|
|
|
.queryProEquRel(map);
|
|
|
//格式化时间和状态
|
|
|
list = Service.lookup(IFormatService.class).formatDateTime(list, "createTime", "modifyTime");
|
|
|
- list = new MINCopyFormat("{perState:'sttDesc',isPromotton:'isPromottonDesc',isFragile:'isFragileDesc'}").format(list);
|
|
|
- list = Service.lookup(IFormatService.class).formatEnum(list, "{sttDesc:'PROEQUREL_STATE',isPromottonDesc:'IS_PROMOTION',isFragileDesc:'IS_FRAGILE'}");
|
|
|
+ list = new MINCopyFormat("{perState:'sttDesc',isPromotton:'isPromottonDesc',isFragile:'isFragileDesc',type:'gameType'}").format(list);
|
|
|
+ list = Service.lookup(IFormatService.class).formatEnum(list, "{sttDesc:'PROEQUREL_STATE',isPromottonDesc:'IS_PROMOTION',isFragileDesc:'IS_FRAGILE','gameType':'GAME_SETUP_TYPE'}");
|
|
|
//传递数据
|
|
|
res.set("equType",vmEquipmentInf.getEquType());
|
|
|
res.set(IMINBusinessConstant.F_PAGING_LAY, list);
|
|
@@ -412,4 +417,48 @@ public class MachineManageAction implements IMINAction {
|
|
|
Service.lookup(ILogService.class).logging(session, logInfo);
|
|
|
return res;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 查询设备中商品
|
|
|
+ *
|
|
|
+ * @param session
|
|
|
+ * @return
|
|
|
+ * @throws MINBusinessException
|
|
|
+ */
|
|
|
+ @MINAction(value = QUERY_PROEQUREL_MANAGE)
|
|
|
+ public MINActionResult queryProEquRelManage(
|
|
|
+ @MINParam(key = "equId") String equId,
|
|
|
+ @MINParam(key = "gameType") String gameType,
|
|
|
+ MINSession session
|
|
|
+ ) throws MINBusinessException {
|
|
|
+
|
|
|
+ MINActionResult res = new MINActionResult();
|
|
|
+
|
|
|
+ User user = session.getUser();
|
|
|
+ //渠道
|
|
|
+ String channel = user.getChannel();
|
|
|
+ VmEquipmentInf vmEquipmentInf = Service.lookup(IMINDataBaseService.class)
|
|
|
+ .getMybatisMapper(VmEquipmentInfMapper.class)
|
|
|
+ .selectByPrimaryKey(equId);
|
|
|
+ if (vmEquipmentInf == null){
|
|
|
+ throw new MINBusinessException("该设备不存在!");
|
|
|
+ }
|
|
|
+ // 查询条件
|
|
|
+ Map<String, String> map = new HashMap<String, String>();
|
|
|
+ map.put("channel", "V01");
|
|
|
+ map.put("equId", equId);
|
|
|
+ map.put("gameType", gameType);
|
|
|
+ List<Map<String, Object>> list = Service.lookup(IMINDataBaseService.class)
|
|
|
+ .getMybatisMapper(MachineManageMapper.class)
|
|
|
+ .queryProEquRel(map);
|
|
|
+ //格式化时间和状态
|
|
|
+ list = Service.lookup(IFormatService.class).formatDateTime(list, "createTime", "modifyTime");
|
|
|
+ list = new MINCopyFormat("{perState:'sttDesc',isPromotton:'isPromottonDesc',isFragile:'isFragileDesc',type:'gameType'}").format(list);
|
|
|
+ list = Service.lookup(IFormatService.class).formatEnum(list, "{sttDesc:'PROEQUREL_STATE',isPromottonDesc:'IS_PROMOTION',isFragileDesc:'IS_FRAGILE','gameType':'GAME_SETUP_TYPE'}");
|
|
|
+ //传递数据
|
|
|
+ res.set("equType",vmEquipmentInf.getEquType());
|
|
|
+ res.set(IMINBusinessConstant.F_PAGING_LAY, list);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|