瀏覽代碼

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	svr/svr-iot/src/main/java/com/yihu/iot/controller/platform/IotInterfaceController.java
mengkang 4 年之前
父節點
當前提交
542fc2efbb

+ 12 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/iot/platform/IotShareInterfaceDO.java

@ -35,6 +35,10 @@ public class IotShareInterfaceDO extends UuidIdentityEntityWithOperator implemen
    @Column(name = "del")
    private String del;//是否删除 1:删除  0:不删除
    @Column(name = "doc_url")
    private String docUrl;//接口文档URL
    public String getSaasId() {
        return saasId;
    }
@ -82,4 +86,12 @@ public class IotShareInterfaceDO extends UuidIdentityEntityWithOperator implemen
    public void setDel(String del) {
        this.del = del;
    }
    public String getDocUrl() {
        return docUrl;
    }
    public void setDocUrl(String docUrl) {
        this.docUrl = docUrl;
    }
}

+ 8 - 6
svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotDeviceSimController.java

@ -33,17 +33,19 @@ public class IotDeviceSimController extends EnvelopRestEndpoint {
    @PostMapping(value = IotRequestMapping.DeviceSim.editSIM)
    @ApiOperation(value = "编辑SIM卡管理", notes = "编辑SIM卡管理")
    public MixEnvelop<IotOrderVO, IotOrderVO> editSIM(@ApiParam(name = "id", value = "ID", defaultValue = "")
                                                     @RequestParam(value = "id",required = true) String id,
                                                            @RequestParam(value = "id",required = true) String id,
                                                      @ApiParam(name = "simId", value = "simId", defaultValue = "")
                                                            @RequestParam(value = "simId",required = true) String simId,
                                                      @ApiParam(name = "advancePayment", value = "预缴金额", defaultValue = "")
                                                      @RequestParam(value = "advancePayment",required = true) String advancePayment,
                                                            @RequestParam(value = "advancePayment",required = true) String advancePayment,
                                                      @ApiParam(name = "payment", value = "套餐资费", defaultValue = "")
                                                          @RequestParam(value = "payment",required = true) String payment,
                                                            @RequestParam(value = "payment",required = true) String payment,
                                                      @ApiParam(name = "remainingBalance", value = "余额", defaultValue = "")
                                                          @RequestParam(value = "remainingBalance",required = true) String remainingBalance,
                                                            @RequestParam(value = "remainingBalance",required = true) String remainingBalance,
                                                      @ApiParam(name = "status", value = "状态", defaultValue = "1")
                                                          @RequestParam(value = "status",required = true) Integer status) {
                                                            @RequestParam(value = "status",required = true) Integer status) {
        try {
           iotDeviceSimService.editSIM(id,advancePayment,payment,remainingBalance,status);
           iotDeviceSimService.editSIM(id,simId,advancePayment,payment,remainingBalance,status);
            return MixEnvelop.getSuccess(IotRequestMapping.DeviceSim.message_success_add);
        } catch (Exception e) {
            e.printStackTrace();

+ 9 - 9
svr/svr-iot/src/main/java/com/yihu/iot/controller/platform/IotInterfaceController.java

@ -354,15 +354,15 @@ public class IotInterfaceController extends EnvelopRestEndpoint {
    @GetMapping(value = IotRequestMapping.Platform.interfaceDoc)
    @ApiOperation(value = "接口文档说明", notes = "接口文档说明")
    public MixEnvelop interfaceDoc( @ApiParam(name = "dictName", value = "字典名称", defaultValue = "")
                                        @RequestParam(value = "dictName") String dictName){
       String url =  iotShareInterfaceService.interfaceDoc(dictName);
       return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find,url);
    }
//    @GetMapping(value = IotRequestMapping.Platform.interfaceDoc)
//    @ApiOperation(value = "接口文档说明", notes = "接口文档说明")
//    public MixEnvelop interfaceDoc( @ApiParam(name = "dictName", value = "字典名称", defaultValue = "")
//                                        @RequestParam(value = "dictName") String dictName){
//
//       String url =  iotShareInterfaceService.interfaceDoc(dictName);
//       return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find,url);
//
//    }
    @PostMapping(value = IotRequestMapping.Platform.addApp)

+ 4 - 0
svr/svr-iot/src/main/java/com/yihu/iot/dao/company/IotCompanyDao.java

@ -32,4 +32,8 @@ public interface IotCompanyDao extends PagingAndSortingRepository<IotCompanyDO,
    @Query("from IotCompanyDO w where w.name =?1 and w.accountType=?2 and w.del=1")
    IotCompanyDO findByNameAndAccountType(String name,String accountType);
    @Query("from IotCompanyDO w where w.ehrUserId =?1 and w.del=1")
    IotCompanyDO findByEhrUserId(String uid);
}

+ 3 - 3
svr/svr-iot/src/main/java/com/yihu/iot/service/company/IotCompanyService.java

@ -287,7 +287,7 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
    public MixEnvelop<IotCompanyVO, IotCompanyVO> create(IotCompanyDO iotCompany) {
        //判断账户是否重复
        IotCompanyDO account = iotCompanyDao.findByAccount(userAgent.getUID());
        IotCompanyDO account = iotCompanyDao.findByEhrUserId(userAgent.getUID());
        if (account==null){
            return MixEnvelop.getSuccess("账户已注册",-1);
        }
@ -785,7 +785,7 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
     */
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findCompanyByAccount() {
        IotCompanyDO companyDO = iotCompanyDao.findByAccount(userAgent.getUID());
        IotCompanyDO companyDO = iotCompanyDao.findByEhrUserId(userAgent.getUID());
        if (companyDO==null){
            return MixEnvelop.getSuccess("未入驻企业",-1);
        }
@ -799,7 +799,7 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
     */
    public MixEnvelop<IotCompanyAppVO, IotCompanyAppVO> findCompanyApp() {
        IotCompanyDO account = iotCompanyDao.findByAccount(userAgent.getUID());
        IotCompanyDO account = iotCompanyDao.findByEhrUserId(userAgent.getUID());
        List<IotCompanyAppDO> appDOS = iotCompanyAppDao.findByCompanyId(account.getId());
        return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find,appDOS);

+ 7 - 5
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotDeviceSimService.java

@ -66,13 +66,15 @@ public class IotDeviceSimService  extends BaseJpaService<IotDeviceSimDO, IotDevi
     * @param remainingBalance
     * @param status
     */
    public void editSIM(String id,String advancePayment,String payment,String remainingBalance,Integer status ) {
    public void editSIM(String id,String simId,String advancePayment,String payment,String remainingBalance,Integer status ) {
        IotDeviceSimDO simDO = iotDeviceSimDao.findOne(id);
        simDO.setSim(simId);
        simDO.setAdvancePayment(Float.parseFloat(advancePayment));
        simDO.setPayment(Float.parseFloat(payment));
        simDO.setRemainingBalance(Float.parseFloat(remainingBalance));
        simDO.setStatus(status);
        simDO.setDel("0");
        iotDeviceSimDao.save(simDO);
    }
@ -119,8 +121,8 @@ public class IotDeviceSimService  extends BaseJpaService<IotDeviceSimDO, IotDevi
     */
    public MixEnvelop<IotDeviceSimDO, IotDeviceSimDO> conditionQueryPage(Integer page, Integer size, String status, String sim, String sn){
        StringBuffer sql = new StringBuffer("SELECT c.* from iot_device_sim c WHERE 1=1 ");
        StringBuffer sqlCount = new StringBuffer("SELECT COUNT(c.id) count from iot_device_sim c  WHERE 1=1 ");
        StringBuffer sql = new StringBuffer("SELECT c.* from iot_device_sim c WHERE del=0 ");
        StringBuffer sqlCount = new StringBuffer("SELECT COUNT(c.id) count from iot_device_sim c  WHERE del=0 ");
        List<Object> args = new ArrayList<>();
        if(StringUtils.isNotBlank(status)){
            sql.append(" and c.status=? ");
@ -154,7 +156,7 @@ public class IotDeviceSimService  extends BaseJpaService<IotDeviceSimDO, IotDevi
     */
    public MixEnvelop<IotDeviceSimDO, IotDeviceSimDO> findAllSim(Integer page, Integer size) {
        StringBuffer sql= new StringBuffer("SELECT DISTINCT * FROM iot_device_sim ");
        StringBuffer sql= new StringBuffer("SELECT DISTINCT * FROM iot_device_sim WHERE del=0 ");
        sql.append(" limit ").append((page-1)*size).append(",").append(size);
@ -195,7 +197,7 @@ public class IotDeviceSimService  extends BaseJpaService<IotDeviceSimDO, IotDevi
     */
    public List<IotDeviceSimDO> findAllRemindSim(String time, String code) {
        StringBuffer sql = new StringBuffer("SELECT a.* FROM iot_device_sim a WHERE 1=1");
        StringBuffer sql = new StringBuffer("SELECT a.* FROM iot_device_sim a WHERE del=0");
        List<Object> args = new ArrayList<>();
        if (StringUtils.isNotBlank(time)){

+ 1 - 1
svr/svr-iot/src/main/java/com/yihu/iot/service/platform/IotInterfaceAuditService.java

@ -230,7 +230,7 @@ public class IotInterfaceAuditService  extends BaseJpaService<IotInterfaceAuditD
     */
    public MixEnvelop<IotInterfaceAuditDO, IotInterfaceAuditDO> queryCompanyAppPage(Integer page, Integer size) {
        IotCompanyDO account = iotCompanyDao.findByAccount(userAgent.getUID());
        IotCompanyDO account = iotCompanyDao.findByEhrUserId(userAgent.getUID());
        StringBuffer sql = new StringBuffer("SELECT DISTINCT * from iot_interface_audit ");
        sql.append("WHERE company_name = '").append(account.getName()).append("'");

+ 9 - 9
svr/svr-iot/src/main/java/com/yihu/iot/service/platform/IotShareInterfaceService.java

@ -148,15 +148,15 @@ public class IotShareInterfaceService extends BaseJpaService<IotShareInterfaceDO
        iotShareInterfaceDao.save(shareInterfaceDO);
    }
    /**
     * 接口文档说明
     * @param dictName
     * @return
     */
    public String interfaceDoc(String dictName) {
        IotSystemDictDO systemDictDO = iotSystemDictDao.findByDictName(dictName).get(0);
        return systemDictDO.getCode();
    }
//    /**
//     * 接口文档说明
//     * @param dictName
//     * @return
//     */
//    public String interfaceDoc(String dictName) {
//        IotSystemDictDO systemDictDO = iotSystemDictDao.findByDictName(dictName).get(0);
//        return systemDictDO.getCode();
//    }
    /**

+ 1 - 1
svr/svr-iot/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name:  svr-iot-shw
    name:  svr-iot
  cloud:
    config:
      failFast: true