Przeglądaj źródła

物联网 BUG修复

mengkang 5 lat temu
rodzic
commit
0b2c4c710a

+ 1 - 1
svr/svr-iot/src/main/java/com/yihu/iot/controller/company/IotCompanyController.java

@ -232,7 +232,7 @@ public class IotCompanyController extends EnvelopRestEndpoint {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> updCompany(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
                                  @RequestParam(value = "jsonData", required = true)String jsonData,
                                                             @ApiParam(name = "accountType", value = "注册类型", defaultValue = "")
                                                             @RequestParam(value = "accountType", required = true)String accountType) {
                                                             @RequestParam(value = "accountType", required = false)String accountType) {
        try {
            IotCompanyVO iotCompanyVO = toEntity(jsonData, IotCompanyVO.class);
            IotCompanyDO iotCompany = iotCompanyService.convertToModelDO(iotCompanyVO);

+ 19 - 19
svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotDeviceQualityController.java

@ -140,7 +140,7 @@ public class IotDeviceQualityController extends EnvelopRestEndpoint {
                                                                   @ApiParam(name = "summary", value = "质检总结")
                                            @RequestParam(value = "summary", required = true) String summary,
                                                                   @ApiParam(name = "imgs", value = "质检图像")
                                            @RequestParam(value = "imgs",required = false,defaultValue = "") List<String> imgs ) {
                                            @RequestParam(value = "imgs",required = false,defaultValue = "") String imgs ) {
        try {
            iotDeviceQualityInspectionPlanService.completePlan(id,actualTime,summary,imgs);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find);
@ -150,24 +150,24 @@ public class IotDeviceQualityController extends EnvelopRestEndpoint {
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceQuality.completePlanByPurchaseId)
    @ApiOperation(value = "完成质检计划(按采购id)", notes = "完成质检计划(按采购id)")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
                                                                @RequestParam(value = "actualTime", required = true) String actualTime,
                                                                                 @ApiParam(name = "purchaseId", value = "purchaseId")
                                                                @RequestParam(value = "purchaseId", required = true) String purchaseId,
                                                                                 @ApiParam(name = "summary", value = "质检总结")
                                                                @RequestParam(value = "summary", required = true) String summary,
                                                                                 @ApiParam(name = "imgs", value = "质检图像")
                                                                @RequestBody List<String> imgs ) {
        try{
            iotDeviceQualityInspectionPlanService.completePlanByPurchaseId(purchaseId,actualTime,summary,imgs);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find);
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError(e.getMessage());
        }
    }
//    @PostMapping(value = IotRequestMapping.DeviceQuality.completePlanByPurchaseId)
//    @ApiOperation(value = "完成质检计划(按采购id)", notes = "完成质检计划(按采购id)")
//    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
//                                                                @RequestParam(value = "actualTime", required = true) String actualTime,
//                                                                                 @ApiParam(name = "purchaseId", value = "purchaseId")
//                                                                @RequestParam(value = "purchaseId", required = true) String purchaseId,
//                                                                                 @ApiParam(name = "summary", value = "质检总结")
//                                                                @RequestParam(value = "summary", required = true) String summary,
//                                                                                 @ApiParam(name = "imgs", value = "质检图像")
//                                                                @RequestBody List<String> imgs ) {
//        try{
//            iotDeviceQualityInspectionPlanService.completePlanByPurchaseId(purchaseId,actualTime,summary,imgs);
//            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find);
//        } catch (Exception e) {
//            e.printStackTrace();
//            return MixEnvelop.getError(e.getMessage());
//        }
//    }

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

@ -312,8 +312,8 @@ public class IotInterfaceController extends EnvelopRestEndpoint {
                                                                                 @RequestParam(value = "size", required = false) Integer size,
                                                                             @ApiParam(name = "interfaceName", value = "接口名称", defaultValue = "")
                                                                                 @RequestParam(value = "interfaceName") String interfaceName,
                                                                             @ApiParam(name = "addresssIp", value = "IP地址", defaultValue = "")
                                                                                 @RequestParam(value = "addresssIp",required = false) String addresssIp) {
                                                                             @ApiParam(name = "addressIp", value = "IP地址", defaultValue = "")
                                                                                 @RequestParam(value = "addressIp",required = false) String addressIp) {
        try {
            if(page == null|| page < 0){
@ -323,7 +323,7 @@ public class IotInterfaceController extends EnvelopRestEndpoint {
                size = 10;
            }
            return MixEnvelop.getSuccess(IotRequestMapping.Platform.message_success_find, iotInterfaceLogService.findInterfaceLog(page,size,interfaceName,addresssIp));
            return MixEnvelop.getSuccess(IotRequestMapping.Platform.message_success_find, iotInterfaceLogService.findInterfaceLog(page,size,interfaceName,addressIp));
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError(e.getMessage());

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

@ -796,7 +796,11 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
     * @param iotCompany
     */
    public void updCompany(IotCompanyDO iotCompany,String accountType){
        
        if (accountType==null){
            accountType=iotCompany.getAccountType();
        }
        if(accountType.equalsIgnoreCase("1")){
            //更新类型
            List<IotCompanyTypeDO> typeList = iotCompanyTypeDao.findByCompanyId(iotCompany.getId());

+ 2 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotDeviceQualityInspectionPlanService.java

@ -122,7 +122,7 @@ public class IotDeviceQualityInspectionPlanService extends BaseJpaService<IotDev
     * 完成质检计划
     * @param id 质检id
     */
    public void completePlan(String id,String time,String summary,List<String> imgs){
    public void completePlan(String id,String time,String summary,String imgs){
        IotDeviceQualityInspectionPlanDO planDO = iotDeviceQualityInspectionPlanDao.findById(id);
        if(planDO!=null){
            planDO.setStatus(IotDeviceQualityInspectionPlanDO.QualityPlanStatus.complete.getValue());
@ -130,7 +130,7 @@ public class IotDeviceQualityInspectionPlanService extends BaseJpaService<IotDev
            planDO.setSummary(summary);
            //设置质检小结与质检图像
            planDO.setImg(imgs.toString());
            planDO.setImg(imgs);
            iotDeviceQualityInspectionPlanDao.save(planDO);