Commit 6769e10b authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 521e7a3a 53e19463
...@@ -316,3 +316,20 @@ INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `par ...@@ -316,3 +316,20 @@ INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `par
-- 门户用户同步(2024-01-17) -- 门户用户同步(2024-01-17)
-- ---------- -- ----------
INSERT INTO `mortals_xhx_task` (`name`, `taskKey`, `status`, `excuteService`, `excuteParam`, `excuteHost`, `excuteStrategy`, `excuteDate`, `excuteTime`, `remark`, `lastExcuteHost`, `lastExcuteTime`, `interimExcuteStatus`, `createTime`, `createUserId`, `createUserName`) VALUES ('同步门户用户', 'SyncPortalUserTask', '0', 'SyncPortalUserTask', NULL, NULL, '1', '0', '22:01', NULL, '172.17.0.1', '2024-01-16 22:01:01', '0', '2023-08-24 22:29:18', '1', '系统管理员'); INSERT INTO `mortals_xhx_task` (`name`, `taskKey`, `status`, `excuteService`, `excuteParam`, `excuteHost`, `excuteStrategy`, `excuteDate`, `excuteTime`, `remark`, `lastExcuteHost`, `lastExcuteTime`, `interimExcuteStatus`, `createTime`, `createUserId`, `createUserName`) VALUES ('同步门户用户', 'SyncPortalUserTask', '0', 'SyncPortalUserTask', NULL, NULL, '1', '0', '22:01', NULL, '172.17.0.1', '2024-01-16 22:01:01', '0', '2023-08-24 22:29:18', '1', '系统管理员');
-- ----------------------------
-- 综窗接件信息表 (2024-04-10)
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_accept`;
CREATE TABLE mortals_xhx_accept(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`applicantId` varchar(128) NOT NULL COMMENT '接件id',
`storageInfo` varchar(128) NOT NULL COMMENT '存储信息',
`createUserId` bigint(20) COMMENT '创建用户',
`createTime` datetime COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
,KEY `storageInfo` (`storageInfo`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='综窗接件信息';
\ No newline at end of file
package com.mortals.xhx.module.accept.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.accept.model.AcceptEntity;
import java.util.List;
/**
* 综窗接件信息Dao
* 综窗接件信息 DAO接口
*
* @author zxfei
* @date 2024-04-10
*/
public interface AcceptDao extends ICRUDDao<AcceptEntity,Long>{
}
package com.mortals.xhx.module.accept.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.accept.dao.AcceptDao;
import com.mortals.xhx.module.accept.model.AcceptEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 综窗接件信息DaoImpl DAO接口
*
* @author zxfei
* @date 2024-04-10
*/
@Repository("acceptDao")
public class AcceptDaoImpl extends BaseCRUDDaoMybatis<AcceptEntity,Long> implements AcceptDao {
}
package com.mortals.xhx.module.accept.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.accept.model.vo.AcceptVo;
import lombok.Data;
/**
* 综窗接件信息实体对象
*
* @author zxfei
* @date 2024-04-10
*/
@Data
public class AcceptEntity extends AcceptVo {
private static final long serialVersionUID = 1L;
/**
* 接件id
*/
private String applicantId;
/**
* 存储信息
*/
private String storageInfo;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof AcceptEntity) {
AcceptEntity tmp = (AcceptEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.applicantId = "";
this.storageInfo = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.accept.model.vo;
import lombok.Data;
@Data
public class AcceptPdu {
/** 接件id */
private String applicantId;
/** 寄存柜名称 */
private String lockerName;
/** 寄存柜编号 */
private String lockerNumber;
/** 存储时间 */
private String dateTime;
}
package com.mortals.xhx.module.accept.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.accept.model.AcceptEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 综窗接件信息视图对象
*
* @author zxfei
* @date 2024-04-10
*/
@Data
public class AcceptVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.accept.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.accept.model.AcceptEntity;
import com.mortals.xhx.module.accept.dao.AcceptDao;
/**
* AcceptService
*
* 综窗接件信息 service接口
*
* @author zxfei
* @date 2024-04-10
*/
public interface AcceptService extends ICRUDService<AcceptEntity,Long>{
AcceptDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.accept.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.accept.dao.AcceptDao;
import com.mortals.xhx.module.accept.model.AcceptEntity;
import com.mortals.xhx.module.accept.service.AcceptService;
import lombok.extern.slf4j.Slf4j;
/**
* AcceptService
* 综窗接件信息 service实现
*
* @author zxfei
* @date 2024-04-10
*/
@Service("acceptService")
@Slf4j
public class AcceptServiceImpl extends AbstractCRUDServiceImpl<AcceptDao, AcceptEntity, Long> implements AcceptService {
}
\ No newline at end of file
package com.mortals.xhx.module.accept.web;
import com.mortals.framework.annotation.RepeatSubmit;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.model.BaseEntity;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.utils.BeanUtil;
import com.mortals.framework.utils.ReflectUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.accept.model.AcceptQuery;
import com.mortals.xhx.module.accept.model.vo.AcceptPdu;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.accept.model.AcceptEntity;
import com.mortals.xhx.module.accept.service.AcceptService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
import com.mortals.xhx.common.code.*;
/**
*
* 综窗接件信息
*
* @author zxfei
* @date 2024-04-10
*/
@RestController
@RequestMapping("accept")
public class AcceptController extends BaseCRUDJsonBodyMappingController<AcceptService,AcceptEntity,Long> {
@Autowired
private ParamService paramService;
public AcceptController(){
super.setModuleDesc( "综窗接件信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
@PostMapping({"insert"})
@UnAuth
@RepeatSubmit
public String save(@RequestBody AcceptPdu pdu) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
int code = 1;
String busiDesc = "新增" + this.getModuleDesc();
AcceptEntity entity = new AcceptEntity();
try {
entity.setApplicantId(pdu.getApplicantId());
if(StringUtils.isEmpty(pdu.getDateTime())){
pdu.setDateTime(DateUtils.getCurrStrDateTime());
}
entity.setStorageInfo(JSONObject.toJSONString(pdu));
entity.setCreateUserId(1l);
entity.setCreateTime(new Date());
this.saveBefore(entity, model, context);
this.service.save(entity, context);
model.put("id", entity.getId());
code = this.saveAfter(entity, model, context);
model.put("entity", entity);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var9) {
this.doException(this.request, busiDesc, model, var9);
model.put("entity", entity);
this.init(model, context);
code = this.saveException(entity, model, context, var9);
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
@PostMapping({"getInfo"})
@UnAuth
public String getInfo(@RequestBody AcceptPdu pdu) {
Map<String, Object> model = new HashMap();
Context context = this.getContext();
int code = 1;
String busiDesc = "获取" + this.getModuleDesc();
try {
AcceptEntity entity = this.service.selectOne(new AcceptQuery().applicantId(pdu.getApplicantId()));
if(entity!=null){
pdu = JSONObject.parseObject(entity.getStorageInfo(),AcceptPdu.class);
}
model.put("entity", pdu);
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + entity.getId() + "]");
} catch (Exception var9) {
this.doException(this.request, busiDesc, model, var9);
model.put("entity", pdu);
this.init(model, context);
}
this.init(model, context);
JSONObject ret = new JSONObject();
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
}
}
\ No newline at end of file
...@@ -25,7 +25,7 @@ public class DeviceEntity extends DeviceVo { ...@@ -25,7 +25,7 @@ public class DeviceEntity extends DeviceVo {
/** /**
* 设备编码,SN码等,默认为MAC地址 * 设备编码,SN码等,默认为MAC地址
*/ */
@Excel(name = "设备编码") @Excel(name = "设备编码,SN码等,默认为MAC地址")
private String deviceCode; private String deviceCode;
/** /**
* 设备的MAC地址 * 设备的MAC地址
...@@ -130,6 +130,7 @@ public class DeviceEntity extends DeviceVo { ...@@ -130,6 +130,7 @@ public class DeviceEntity extends DeviceVo {
/** /**
* 设备图片 * 设备图片
*/ */
@Excel(name = "设备图片")
private String devicePhotoPath; private String devicePhotoPath;
/** /**
* 设备访问ip * 设备访问ip
...@@ -183,6 +184,7 @@ public class DeviceEntity extends DeviceVo { ...@@ -183,6 +184,7 @@ public class DeviceEntity extends DeviceVo {
/** /**
* 设备SN码 * 设备SN码
*/ */
@Excel(name = "设备SN码")
private String deviceSN; private String deviceSN;
/** /**
* 设备版本 * 设备版本
...@@ -191,7 +193,6 @@ public class DeviceEntity extends DeviceVo { ...@@ -191,7 +193,6 @@ public class DeviceEntity extends DeviceVo {
/** /**
* 产品编码 * 产品编码
*/ */
@Excel(name = "产品类型")
private String productCode; private String productCode;
/** /**
* 大厅Id * 大厅Id
...@@ -214,6 +215,18 @@ public class DeviceEntity extends DeviceVo { ...@@ -214,6 +215,18 @@ public class DeviceEntity extends DeviceVo {
* 是否显示小程序二维码(0.否,1.是) * 是否显示小程序二维码(0.否,1.是)
*/ */
private Integer showWechatQrCode; private Integer showWechatQrCode;
/**
* 所属机构
*/
private String orgName;
/**
* 设备分辨率
*/
private String resolution;
/**
* 设备分辨率值
*/
private String resolutionValue;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -231,98 +244,55 @@ public class DeviceEntity extends DeviceVo { ...@@ -231,98 +244,55 @@ public class DeviceEntity extends DeviceVo {
} }
public void initAttrValue(){ public void initAttrValue(){
this.deviceName = ""; this.deviceName = "";
this.deviceCode = ""; this.deviceCode = "";
this.deviceMac = ""; this.deviceMac = "";
this.siteId = null; this.siteId = null;
this.siteCode = ""; this.siteCode = "";
this.siteName = ""; this.siteName = "";
this.platformId = null; this.platformId = null;
this.platformName = ""; this.platformName = "";
this.productId = null; this.productId = null;
this.productName = ""; this.productName = "";
this.skinId = null; this.skinId = null;
this.skinName = ""; this.skinName = "";
this.homeUrl = ""; this.homeUrl = "";
this.deviceFirmId = null; this.deviceFirmId = null;
this.deviceFirmname = ""; this.deviceFirmname = "";
this.deviceSrc = 2; this.deviceSrc = 2;
this.deviceDataSourceWay = 0; this.deviceDataSourceWay = 0;
this.lon = ""; this.lon = "";
this.lati = ""; this.lati = "";
this.deviceInBuilding = 0;
this.deviceInBuilding = null; this.deviceInFloor = 0;
this.defectsLiabilityPeriod = new Date();
this.deviceInFloor = null;
this.defectsLiabilityPeriod = null;
this.leadingOfficial = ""; this.leadingOfficial = "";
this.leadingOfficialTelephone = ""; this.leadingOfficialTelephone = "";
this.isReceiveMess = 0; this.isReceiveMess = 0;
this.devicePhotoPath = ""; this.devicePhotoPath = "";
this.ip = ""; this.ip = "";
this.centernum = ""; this.centernum = "";
this.port = ""; this.port = "";
this.deviceTopic = ""; this.deviceTopic = "";
this.deviceStatus = 0; this.deviceStatus = 0;
this.enabled = 0; this.enabled = 0;
this.deviceAuthCode = ""; this.deviceAuthCode = "";
this.deviceRemark = ""; this.deviceRemark = "";
this.onlineTime = new Date();
this.onlineTime = null; this.offlineTime = new Date();
this.offlineTime = null;
this.deleted = 0; this.deleted = 0;
this.source = 1; this.source = 1;
this.deviceSN = ""; this.deviceSN = "";
this.deviceVersion = ""; this.deviceVersion = "";
this.productCode = ""; this.productCode = "";
this.hallId = null; this.hallId = null;
this.hallName = ""; this.hallName = "";
this.showSms = 1; this.showSms = 1;
this.showPrint = 1; this.showPrint = 1;
this.showWechatQrCode = 1; this.showWechatQrCode = 1;
this.orgName = "";
this.resolution = "";
this.resolutionValue = "";
} }
} }
...@@ -50,7 +50,7 @@ public class MatterDatumFileController extends BaseCRUDJsonBodyMappingController ...@@ -50,7 +50,7 @@ public class MatterDatumFileController extends BaseCRUDJsonBodyMappingController
@Override @Override
@UnAuth @UnAuth
public Rest<Object> list(MatterDatumFileEntity query) { public Rest<Object> list(@RequestBody MatterDatumFileEntity query) {
return super.list(query); return super.list(query);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment