Commit 563d88ca authored by zhuangzhuang's avatar zhuangzhuang

8.9-修复仓库环境数据异常bug;增加了公司自定义主题颜色以及字体颜色的功能能

parent 4b485e45
......@@ -19,31 +19,11 @@ public class AddCompanyVo {
private String img;
private String roleName;
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
private String themeColors;
public String getImg() {
return img;
}
private String roleName;
public void setImg(String img) {
this.img = img;
}
private String fontColors;
public String getCompanyNo() {
return companyNo;
......@@ -61,6 +41,14 @@ public class AddCompanyVo {
this.companyName = companyName;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getCountry() {
return country;
}
......@@ -100,4 +88,36 @@ public class AddCompanyVo {
public void setManager(String manager) {
this.manager = manager;
}
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
public String getThemeColors() {
return themeColors;
}
public void setThemeColors(String themeColors) {
this.themeColors = themeColors;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getFontColors() {
return fontColors;
}
public void setFontColors(String fontColors) {
this.fontColors = fontColors;
}
}
......@@ -19,21 +19,9 @@ public class ResultCompanyVo {
private String img;
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
private String themeColors;
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
private String fontColors;
public String getCompanyNo() {
return companyNo;
......@@ -51,6 +39,14 @@ public class ResultCompanyVo {
this.companyName = companyName;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getCountry() {
return country;
}
......@@ -90,4 +86,28 @@ public class ResultCompanyVo {
public void setManager(String manager) {
this.manager = manager;
}
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
public String getThemeColors() {
return themeColors;
}
public void setThemeColors(String themeColors) {
this.themeColors = themeColors;
}
public String getFontColors() {
return fontColors;
}
public void setFontColors(String fontColors) {
this.fontColors = fontColors;
}
}
......@@ -17,6 +17,10 @@ public class UpdateCompanyVo {
private String manager;
private String themeColors;
private String fontColors;
public String getAlias() {
return alias;
}
......@@ -80,4 +84,20 @@ public class UpdateCompanyVo {
public void setManager(String manager) {
this.manager = manager;
}
public String getThemeColors() {
return themeColors;
}
public void setThemeColors(String themeColors) {
this.themeColors = themeColors;
}
public String getFontColors() {
return fontColors;
}
public void setFontColors(String fontColors) {
this.fontColors = fontColors;
}
}
......@@ -12,6 +12,12 @@ public class UserNameVo {
private String companyAlias;
private String themeColors;
private String companyNo;
private String fontColors;
public UserNameVo() {
}
......@@ -23,6 +29,25 @@ public class UserNameVo {
this.companyAlias = companyAlias;
}
public UserNameVo(String userName, String time, String ipAddress, String companyImg, String companyAlias, String themeColors, String companyNo, String fontColors) {
UserName = userName;
this.time = time;
this.ipAddress = ipAddress;
this.companyImg = companyImg;
this.companyAlias = companyAlias;
this.themeColors = themeColors;
this.companyNo = companyNo;
this.fontColors = fontColors;
}
public String getThemeColors() {
return themeColors;
}
public void setThemeColors(String themeColors) {
this.themeColors = themeColors;
}
public String getCompanyAlias() {
return companyAlias;
}
......@@ -63,4 +88,20 @@ public class UserNameVo {
this.ipAddress = ipAddress;
}
public String getCompanyNo() {
return companyNo;
}
public void setCompanyNo(String companyNo) {
this.companyNo = companyNo;
}
public String getFontColors() {
return fontColors;
}
public void setFontColors(String fontColors) {
this.fontColors = fontColors;
}
}
......@@ -23,6 +23,8 @@ public interface TDLLogMapper {
ResultAlarmVo getWarehouseByTdl(@Param("warehouseNo") String warehouseNo, @Param("TDLSN") String TDLSN);
ResultAlarmVo getAlarm(@Param("gatewaySN")String gatewaySN,@Param("gatewayType")String gatewayType,@Param("TDLSN")String TdlSN);
List<WarehouseLogVo> getByWarehouse(String warehouseNo);
Long getTimeByWarehouseNo(@Param("warehouseNo")String warehouseNo,@Param("gatewaySN")String gatewaySN);
......
......@@ -42,6 +42,9 @@ public class TDLLogService {
public ResultAlarmVo getWarehouseByTdl(String warehouseNo,String TdlSN){
return tdlLogMapper.getWarehouseByTdl(warehouseNo,TdlSN);
}
public ResultAlarmVo getAlarm(String gatewaySN,String gatewayType,String TdlSN){
return tdlLogMapper.getAlarm(gatewaySN,gatewayType,TdlSN);
}
public List<WarehouseLogVo> getByWarehouse(String warehouseNo){
return tdlLogMapper.getByWarehouse(warehouseNo);
......
......@@ -126,11 +126,26 @@ public class CompanyController {
fb.setMessage(i18n.getMessage(request,"manager"));
return gson.toJson(fb);
}
// if (!addCompanyVo.getTel().matches("^1[34578]\\d{9}$")){
// fb.setCode(0);
// fb.setMessage(i18n.getMessage(request,"wrongTel"));
// return gson.toJson(fb);
// }
if(StringUtils.isEmpty(addCompanyVo.getThemeColors())){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"themeColors"));
return gson.toJson(fb);
}
if(!addCompanyVo.getThemeColors().matches("^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$")){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"wrongThemeColors"));
return gson.toJson(fb);
}
if(StringUtils.isEmpty(addCompanyVo.getFontColors())){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"fontColors"));
return gson.toJson(fb);
}
if(!addCompanyVo.getFontColors().matches("^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$")){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"wrongFontColors"));
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addCompanyVo.getRoleName())){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"roleName"));
......@@ -164,6 +179,8 @@ public class CompanyController {
map.put("addressDetail",addCompanyVo.getAddressDetail());
map.put("tel",addCompanyVo.getTel());
map.put("manager",addCompanyVo.getManager());
map.put("themeColors",addCompanyVo.getThemeColors());
map.put("fontColors",addCompanyVo.getFontColors());
map.put("img",addCompanyVo.getImg());
map.put("parentCompanyNo",user.getCompanyNo());
map.put("roleName",addCompanyVo.getRoleName());
......@@ -243,6 +260,26 @@ public class CompanyController {
fb.setMessage(i18n.getMessage(request,"manager"));
return gson.toJson(fb);
}
if(StringUtils.isEmpty(updateCompanyVo.getThemeColors())){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"themeColors"));
return gson.toJson(fb);
}
if(!updateCompanyVo.getThemeColors().matches("^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$")){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"wrongThemeColors"));
return gson.toJson(fb);
}
if(StringUtils.isEmpty(updateCompanyVo.getFontColors())){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"fontColors"));
return gson.toJson(fb);
}
if(!updateCompanyVo.getFontColors().matches("^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$")){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"wrongFontColors"));
return gson.toJson(fb);
}
ResultCompanyVo resultCompanyVo=companyService.getByCompanyNo(updateCompanyVo.getCompanyNo());
if (companyService.getByCompanyName(updateCompanyVo.getCompanyName())!=null&&!resultCompanyVo.getCompanyName().equals(updateCompanyVo.getCompanyName())){
fb.setCode(0);
......
......@@ -68,6 +68,9 @@ public class EquipmentBindingController {
@Autowired
private TopicService topicService;
@Autowired
private TDLLogService tdlLogService;
@Autowired
private I18nController i18n;
......@@ -159,8 +162,7 @@ public class EquipmentBindingController {
gpsPeriod=5;
gprsPeriod=15;
}
//开始绑定
//获取gateway下的所有tdl的编号
ConfigVo configVo =configService.getConfig(bindingVo.getgSN(),bindingVo.getType());
List<Float> tempL = new ArrayList<>();
List<Float> tempH = new ArrayList<>();
List<Float> humiL = new ArrayList<>();
......@@ -171,7 +173,22 @@ public class EquipmentBindingController {
List<Float> accThreshold = new ArrayList<>();
List<Integer> timeThreshold = new ArrayList<>();
List<Integer> tiltThreshold = new ArrayList<>();
List<String> devList = new ArrayList<>();
ResultAlarmVo alarmVo = alarmService.getByType(bindingVo.getAlarmType(),user.getCompanyNo());
if(!StringUtils.isEmpty(configVo.getMessage())){
ConfigCMDVo config = gson.fromJson(configVo.getMessage(),ConfigCMDVo.class);
tempL.addAll(config.getTempL());
tempH.addAll(config.getTempH());
humiL.addAll(config.getHumiL());
humiH.addAll(config.getHumiH());
pressL.addAll(config.getPressL());
pressH.addAll(config.getPressH());
sugEnergy.addAll(config.getSugEnergy());
accThreshold.addAll(config.getAccThreshold());
timeThreshold.addAll(config.getTimeThreshold());
tiltThreshold.addAll(config.getTiltThreshold());
devList.addAll(config.getDevList());
}
tempL.add(alarmVo.getTemMin());
tempH.add(alarmVo.getTemMax());
humiL.add(alarmVo.getHumidityMin());
......@@ -182,8 +199,9 @@ public class EquipmentBindingController {
accThreshold.add(Float.valueOf(alarmVo.getShock()));
timeThreshold.add(5);
tiltThreshold.add((int)Double.parseDouble(alarmVo.getTilt().toString()));
List<String> devList = tdlDeviceService.getByGatewaySN(bindingVo.getgSN(),bindingVo.getType());
devList.add("TDL-"+bindingVo.getTDLSN());
//开始绑定
//获取gateway下的所有tdl的编号
ConfigCMDVo configCMDVo = new ConfigCMDVo("config",gpsPeriod,gprsPeriod,devList,tempL,tempH,humiL,humiH,pressL,pressH,sugEnergy,accThreshold,timeThreshold,tiltThreshold,bindingVo.getMode(),System.currentTimeMillis()/1000l);
Map<Object,Object> map=new HashMap<>();
map.put("companyNo",user.getCompanyNo());
......@@ -252,14 +270,42 @@ public class EquipmentBindingController {
TDLSN=(String)jsonObject.get("TDLSN");
//判断当前tdl是否有网关在使用
ResultTDLDeviceVo resultTDLDeviceVo = tdlDeviceService.getByTDLSN(TDLSN);
List<String> devList = tdlDeviceService.getByGatewaySN(resultTDLDeviceVo.getGatewaySN(),resultTDLDeviceVo.getGatewayType());
// List<String> devList = tdlDeviceService.getByGatewaySN(resultTDLDeviceVo.getGatewaySN(),resultTDLDeviceVo.getGatewayType());
ConfigVo configVo =configService.getConfig(resultTDLDeviceVo.getGatewaySN(),resultTDLDeviceVo.getGatewayType());
ConfigCMDVo config = gson.fromJson(configVo.getMessage(),ConfigCMDVo.class);
ConfigCMDVo configCMDVo ;
List<Float> tempL = config.getTempL();
List<Float> tempH =config.getTempH();
List<Float> humiL = config.getHumiL();
List<Float> humiH = config.getHumiH();
List<Integer> pressL = config.getPressL();
List<Integer> pressH = config.getPressH();
List<Integer> sugEnergy = config.getSugEnergy();
List<Float> accThreshold =config.getAccThreshold();
List<Integer> timeThreshold = config.getTimeThreshold();
List<Integer> tiltThreshold = config.getTiltThreshold();
List<String> devList = config.getDevList();
ResultAlarmVo alarmVo = tdlLogService.getAlarm(resultTDLDeviceVo.getGatewaySN(),resultTDLDeviceVo.getGatewayType(),TDLSN);
Boolean boo = false;
if(devList.size()>1){
devList.remove("TDL-"+TDLSN);
configCMDVo = new ConfigCMDVo("config",config.getGpsPeriod(),config.getGprsPeriod(),devList,config.getMode(),System.currentTimeMillis()/1000l);
tempL.remove(alarmVo.getTemMin());
tempH.remove(alarmVo.getTemMax());
humiL.remove(alarmVo.getHumidityMin());
humiH.remove(alarmVo.getHumidityMax());
pressL.remove(0);
pressH.remove(0);
sugEnergy.remove(0);
accThreshold.remove(Float.valueOf(alarmVo.getShock()));
timeThreshold.remove(0);
for(int i = 0;i<tiltThreshold.size();i++){
if(tiltThreshold.get(i) == (int)Double.parseDouble(alarmVo.getTilt().toString())){
tiltThreshold.remove(i);
break;
}
}
configCMDVo = new ConfigCMDVo("config",config.getGpsPeriod(),config.getGprsPeriod(),devList,tempL,tempH,humiL,humiH,pressL,pressH,sugEnergy,accThreshold,timeThreshold,tiltThreshold,config.getMode(),System.currentTimeMillis()/1000l);
// configCMDVo = new ConfigCMDVo("config",config.getGpsPeriod(),config.getGprsPeriod(),devList,config.getMode(),System.currentTimeMillis()/1000l);
}else{
configCMDVo = null;
boo = true;
......
......@@ -213,7 +213,8 @@ public class RoleController {
fb.setMessage(i18n.getMessage(request,"roleName"));
return gson.toJson(fb);
}
if (roleService.getByRoleName(updateRoleVo.getRoleName(),user.getCompanyNo())!=null&&!updateRoleVo.getOldRoleName().equals(updateRoleVo.getRoleName())){
logger.info(roleService.getByRoleName(updateRoleVo.getRoleName(),user.getCompanyNo()) +"-----");
if (roleService.getByRoleName(updateRoleVo.getRoleName(),user.getCompanyNo())!=0&&!updateRoleVo.getOldRoleName().equals(updateRoleVo.getRoleName())){
fb.setCode(0);
fb.setMessage(i18n.getMessage(request,"repeatedRole"));
return gson.toJson(fb);
......
......@@ -380,6 +380,7 @@ public class UserController {
return gson.toJson(fb);
}
//修改密码
@ApiOperation(value = "修改密码",notes = "修改密码")
@ApiImplicitParams({
......@@ -423,7 +424,9 @@ public class UserController {
@ApiOperation(value = "获取当前用户的信息",notes = "获取用户的信息" +
"userName:用户名" +
"time:时间" +
"ipAddres:ip")
"ipAddres:ip" +
"companyAlias:公司简称" +
"themeColors:主题颜色")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
@ApiImplicitParam(paramType="header", name = "AccountLanguage", value = "language", required = false, dataType = "String"),
......@@ -437,7 +440,11 @@ public class UserController {
ResultCompanyVo resultCompanyVo=companyService.getByCompanyNo(userRedisVo.getCompanyNo());
String img=resultCompanyVo.getImg();
String companyAlias=resultCompanyVo.getAlias();
return new UserNameVo(userRedisVo.getUserName(),System.currentTimeMillis() +"",ip,img,companyAlias);
// if(resultCompanyVo.getCompanyNo().equals("TM201808097604")){
// return new UserNameVo(userRedisVo.getUserName(),System.currentTimeMillis() +"",ip,companyAlias,img,resultCompanyVo.getThemeColors(),resultCompanyVo.getCompanyNo(),resultCompanyVo.getFontColors());
// }else{
return new UserNameVo(userRedisVo.getUserName(),System.currentTimeMillis() +"",ip,img,companyAlias,resultCompanyVo.getThemeColors(),resultCompanyVo.getCompanyNo(),resultCompanyVo.getFontColors());
// }
}
......
spring.datasource.url=jdbc:mysql://housetest-mysql:3306/tdlCloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
#spring.datasource.url=jdbc:mysql://housetest-mysql:3306/tdlCloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
#spring.datasource.username=root
#spring.datasource.password=37774020
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#
#
#tdl.redis.host=housetest-redis
#
#server.port=8092
#
## InfluxDB
#spring.influxdb.url=http://housetest-influxdb:8086
spring.datasource.url=jdbc:mysql://witcloud-mysql:3306/tdlCloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username=root
spring.datasource.password=37774020
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
tdl.redis.host=housetest-redis
server.port=8092
tdl.redis.host=witcloud-redis
# InfluxDB
spring.influxdb.url=http://housetest-influxdb:8086
spring.influxdb.url=http://witcloud-influxdb:8086
tdl.mqtt.url = ssl://47.96.128.181
tdl.mqtt.port = 8883
tdl.mqtt.username = logistics
tdl.mqtt.password = logistics37774020
#spring.datasource.url=jdbc:mysql://witcloud-mysql:3306/tdlCloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
#spring.datasource.username=root
#spring.datasource.password=37774020
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#
#tdl.redis.host=witcloud-redis
#
## InfluxDB
#spring.influxdb.url=http://witcloud-influxdb:8086
#
#tdl.mqtt.url = ssl://47.96.128.181
#tdl.mqtt.port = 8883
#tdl.mqtt.username = logistics
#tdl.mqtt.password = logistics37774020
#
#tdl.core.add =http://logisticscore-java:8079/witium/addMount
#tdl.core.delete =http://logisticscore-java:8079/witium/delMount
#
#mqtt.userName = wtlogistics
#mqtt.password = wtlogistics
\ No newline at end of file
tdl.core.add =http://logisticscore-java:8079/witium/addMount
tdl.core.delete =http://logisticscore-java:8079/witium/delMount
mqtt.userName = wtlogistics
mqtt.password = wtlogistics
\ No newline at end of file
spring.datasource.url=jdbc:mysql://47.97.184.225:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.url=jdbc:mysql://192.168.1.16:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username=root
spring.datasource.password=37774020
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
......@@ -52,7 +52,7 @@ tdl.mqtt.clientcrt = witcd.crt
# InfluxDB
spring.influxdb.username=admin
spring.influxdb.password=37774020
spring.influxdb.url=http://47.97.184.225:8086
spring.influxdb.url=http://192.168.1.16:8086
spring.influxdb.database=original
spring.influxdb.retentionPolicy = tdl_policy
spring.influxdb.connent-timeout=10
......
......@@ -258,7 +258,7 @@ warehouseProperty2=Walk-in cooler
warehouseProperty3=Central Warehouse
warehouseType1=Flat Warehouse
warehouseType2=Multi-layered Warehouse
warehouseHardwareLevel1=Excelent
warehouseHardwareLevel1=Excellent
warehouseHardwareLevel2=Good
warehouseHardwareLevel3=Fair
warehouseHardwareLevel4=Poor
......@@ -287,4 +287,9 @@ GatewayManagement=Gateway Management
SensorManagement=Sensor Management
AccountManagement=Account Management
VehicleManagement=Vehicle Management
themeColors=Theme color cannot be empty
fontColors=Font color cannot be empty
postCode=Zip code cannot be empty
wrongFontColors=The format of the font color cannot be empty
wrongThemeColors=The format of the theme color is incorrect
......@@ -179,3 +179,14 @@ isState=\u30B2\u30FC\u30C8\u30A6\u30A7\u30A4\u306F\u307B\u304B\u306E\u30EB\u30FC
beingUsed=\u30B2\u30FC\u30C8\u30A6\u30A7\u30A4\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059
updateGatewayCompanySuccess=\u4F1A\u793E\u306E\u6210\u529F\u3092\u914D\u308B\u30B2\u30FC\u30C8\u30A6\u30A7\u30A4
updateGatewayCompanyFailure=\u30B2\u30FC\u30C8\u30A6\u30A7\u30A4\u3092\u4F1A\u793E\u306B\u5272\u308A\u5F53\u3066\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
fontColors=\u30D5\u30A9\u30F3\u30C8\u306E\u8272\u3092\u7A7A\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
themeColors=\u30C6\u30FC\u30DE\u306E\u8272\u306F\u7A7A\u3067\u306F\u3042\u308A\u307E\u305B\u3093
postCode=\u90F5\u4FBF\u756A\u53F7\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093
wrongFontColors=\u30D5\u30A9\u30F3\u30C8\u306E\u8272\u306E\u66F8\u5F0F\u306F\u7A7A\u767D\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
wrongThemeColors=\u30C6\u30FC\u30DE\u306E\u8272\u306E\u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093
day=\u65E5
hour=\u6642\u9593
min=\u5206
sec=\u4E8C\u756A\u76EE
repeateAlias=\u4F1A\u793E\u306E\u7565\u8A9E\u306F\u7E70\u308A\u8FD4\u305B\u307E\u305B\u3093
alias=\u4F1A\u793E\u306E\u7565\u8A9E\u306F\u7A7A\u3067\u306F\u3042\u308A\u307E\u305B\u3093
......@@ -110,6 +110,10 @@ modifyCompanySuccess = \u4FEE\u6539\u516C\u53F8\u6210\u529F
modifyCompanyFailure = \u4FEE\u6539\u516C\u53F8\u5931\u8D25
deleteCompanySuccess = \u5220\u9664\u516C\u53F8\u6210\u529F
deleteCompanyFailure = \u5220\u9664\u516C\u53F8\u5931\u8D25
themeColors = \u4E3B\u9898\u8272\u4E0D\u80FD\u4E3A\u7A7A
wrongThemeColors = \u4E3B\u9898\u8272\u7684\u683C\u5F0F\u4E0D\u6B63\u786E
fontColors = \u5B57\u4F53\u989C\u8272\u4E0D\u80FD\u4E3A\u7A7A
wrongFontColors = \u5B57\u4F53\u989C\u8272\u7684\u683C\u5F0F\u4E0D\u80FD\u4E3A\u7A7A
#\u7528\u6237\u767B\u5F55
userName = \u7528\u6237\u540D\u4E0D\u80FD\u4E3A\u7A7A
password = \u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.example.tdl.mapper.CompanyMapper">
<!--查询所有公司信息-->
<select id="getAll" resultType="com.example.tdl.domain.vo.ResultCompanyVo">
SELECT companyNo,companyName,country,city,addressDetail,tel,manager,img,alias
SELECT companyNo,companyName,country,city,addressDetail,tel,manager,img,alias,themeColors,fontColors
from company
WHERE state=1
<if test="companyNo!='TM201803298320'">
......@@ -24,6 +24,8 @@
#{addressDetail,mode=IN,jdbcType=VARCHAR},
#{tel,mode=IN,jdbcType=VARCHAR},
#{manager,mode=IN,jdbcType=VARCHAR},
#{themeColors,mode=IN,jdbcType=VARCHAR},
#{fontColors,mode=IN,jdbcType=VARCHAR},
#{img,mode=IN,jdbcType=VARCHAR},
#{parentCompanyNo,mode=IN,jdbcType=VARCHAR},
#{roleName,mode=IN,jdbcType=VARCHAR},
......@@ -42,7 +44,9 @@
city=#{city,jdbcType=VARCHAR},
addressDetail=#{addressDetail,jdbcType=VARCHAR},
tel=#{tel,jdbcType=VARCHAR},
manager=#{manager,jdbcType=VARCHAR}
manager=#{manager,jdbcType=VARCHAR},
themeColors=#{themeColors,jdbcType=VARCHAR},
fontColors=#{fontColors,jdbcType=VARCHAR}
WHERE companyNo=#{companyNo,jdbcType=VARCHAR}
</update>
......@@ -58,17 +62,17 @@
</delete>
<select id="getByCompanyName" parameterType="String" resultType="com.example.tdl.domain.vo.ResultCompanyVo">
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img,themeColors,fontColors
from company WHERE state=1 AND companyName=#{companyName,jdbcType=VARCHAR}
</select>
<select id="getByCompanyNo" parameterType="String" resultType="com.example.tdl.domain.vo.ResultCompanyVo">
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img,themeColors,fontColors
from company WHERE state=1 AND companyNo=#{companyNo,jdbcType=VARCHAR}
</select>
<select id="getByAlias" parameterType="String" resultType="com.example.tdl.domain.vo.ResultCompanyVo">
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img
SELECT companyNo,companyName,alias,country,city,addressDetail,tel,manager,img,themeColors,fontColors
from company WHERE state=1 AND alias=#{alias,jdbcType=VARCHAR}
</select>
......
......@@ -119,10 +119,11 @@
<!--根据仓库编号查询网关信息-->
<select id="getByWarehouseNo" parameterType="String" resultType="com.example.tdl.domain.vo.GatewayOnLineVo">
SELECT DISTINCT gatewaySN gSN, gatewayType type,min(createTime) startTime
SELECT DISTINCT gatewaySN gSN, gatewayType type,createTime startTime
from tdl_gateway_log
where warehouseNo=#{warehouseNo,jdbcType=VARCHAR}
and ISNULL(endTime)
GROUP BY gSN
</select>
<select id="getGatewayType" parameterType="String" resultType="com.example.tdl.domain.vo.TypeVo">
......
......@@ -42,6 +42,16 @@
and TDLSN = #{TDLSN,jdbcType=VARCHAR}
</select>
<select id="getAlarm" parameterType="String" resultType="com.example.tdl.domain.vo.ResultAlarmVo">
select alarmType,temMax,temMin,humidityMax,humidityMin,tilt,shock,remark
from alarm a,tdl_gateway_log t
where a.id = t.alarm_id
and gatewaySN = #{gatewaySN,jdbcType=VARCHAR}
and gatewayType = #{gatewayType,jdbcType=VARCHAR}
and TDLSN = #{TDLSN,jdbcType=VARCHAR}
and endTime is null
</select>
<select id="getWarehouseByTdl" parameterType="String" resultType="com.example.tdl.domain.vo.ResultAlarmVo">
select alarmType,temMax,temMin,humidityMax,humidityMin,tilt,shock,remark
from alarm a,tdl_gateway_log t
......
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