Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/jiwei/jw2.0 into dev

LiTaohong 7 năm trước cách đây
mục cha
commit
a3fe1ad040

+ 0 - 4
common/common-entity/pom.xml

@ -36,9 +36,5 @@
            <groupId>com.fasterxml.jackson.core</groupId>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
        </dependency>
    </dependencies>
    </dependencies>
</project>
</project>

+ 3 - 4
common/common-entity/src/main/java/com/yihu/jw/iot/company/IotCompanyDO.java

@ -1,7 +1,6 @@
package com.yihu.jw.iot.company;
package com.yihu.jw.iot.company;
import com.yihu.jw.IdEntityWithOperation;
import com.yihu.jw.IdEntityWithOperation;
import com.yihu.jw.restmodel.iot.company.IotCompanyTypeVO;
import javax.persistence.Column;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Entity;
@ -59,7 +58,7 @@ public class IotCompanyDO extends IdEntityWithOperation implements Serializable
    private Integer del;//删除标志(1有效,0删除)
    private Integer del;//删除标志(1有效,0删除)
    @Transient
    @Transient
    private List<IotCompanyTypeVO> typeList;//类型
    private List<IotCompanyTypeDO> typeList;//类型
    public String getSaasId() {
    public String getSaasId() {
        return saasId;
        return saasId;
@ -213,11 +212,11 @@ public class IotCompanyDO extends IdEntityWithOperation implements Serializable
        this.del = del;
        this.del = del;
    }
    }
    public List<IotCompanyTypeVO> getTypeList() {
    public List<IotCompanyTypeDO> getTypeList() {
        return typeList;
        return typeList;
    }
    }
    public void setTypeList(List<IotCompanyTypeVO> typeList) {
    public void setTypeList(List<IotCompanyTypeDO> typeList) {
        this.typeList = typeList;
        this.typeList = typeList;
    }
    }
}
}

+ 1 - 1
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/company/IotCompanyTypeVO.java

@ -11,7 +11,7 @@ import java.io.Serializable;
 * @author yeshijie on 2018/1/16.
 * @author yeshijie on 2018/1/16.
 */
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(value = "ListResult", description = "企业三证变更记录")
@ApiModel(value = "企业三证变更记录", description = "企业三证变更记录")
public class IotCompanyTypeVO implements Serializable {
public class IotCompanyTypeVO implements Serializable {
    @ApiModelProperty("企业类型code")
    @ApiModelProperty("企业类型code")

+ 1 - 1
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/iot/company/IotCompanyVO.java

@ -15,7 +15,7 @@ import java.util.List;
 * @author yeshijie on 2018/1/15.
 * @author yeshijie on 2018/1/15.
 */
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "ListResult", description = "企业表")
@ApiModel(value = "企业表", description = "企业表")
public class IotCompanyVO extends BaseVO implements Serializable {
public class IotCompanyVO extends BaseVO implements Serializable {
    @ApiModelProperty("审核状态(预留字段)")
    @ApiModelProperty("审核状态(预留字段)")

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

@ -76,7 +76,7 @@ public class IotCompanyController extends EnvelopRestController {
        try {
        try {
            IotCompanyDO iotCompanyDO = iotCompanyService.findById(id);
            IotCompanyDO iotCompanyDO = iotCompanyService.findById(id);
            IotCompanyVO vo = convertToModel(iotCompanyDO,IotCompanyVO.class);
            IotCompanyVO vo = convertToModel(iotCompanyDO,IotCompanyVO.class);
            EnvelopObj<IotCompanyVO> obj = new EnvelopObj<>();
            EnvelopObj<IotCompanyVO> obj = new EnvelopObj<IotCompanyVO>();
            obj.setObj(vo);
            obj.setObj(vo);
            return obj;
            return obj;
        } catch (ApiException e) {
        } catch (ApiException e) {

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

@ -6,7 +6,6 @@ import com.yihu.iot.dao.company.IotCompanyTypeDao;
import com.yihu.jw.iot.company.IotCompanyDO;
import com.yihu.jw.iot.company.IotCompanyDO;
import com.yihu.jw.iot.company.IotCompanyTypeDO;
import com.yihu.jw.iot.company.IotCompanyTypeDO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyTypeVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.StringUtils;
@ -126,7 +125,7 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
        iotCompany.setSaasId(getCode());
        iotCompany.setSaasId(getCode());
        iotCompany.setDel(1);
        iotCompany.setDel(1);
        List<IotCompanyTypeVO> list = iotCompany.getTypeList();
        List<IotCompanyTypeDO> list = iotCompany.getTypeList();
        iotCompany = iotCompanyDao.save(iotCompany);
        iotCompany = iotCompanyDao.save(iotCompany);
        String id = iotCompany.getId();
        String id = iotCompany.getId();
        //新增类型
        //新增类型
@ -162,10 +161,10 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
    public void findType(IotCompanyDO company){
    public void findType(IotCompanyDO company){
        //查找类型
        //查找类型
        List<IotCompanyTypeDO> companyTypes = iotCompanyTypeDao.findByCompanyId(company.getId());
        List<IotCompanyTypeDO> companyTypes = iotCompanyTypeDao.findByCompanyId(company.getId());
        List<IotCompanyTypeVO> list = new ArrayList<>(8);
        List<IotCompanyTypeDO> list = new ArrayList<>(8);
        if(companyTypes.size()>0){
        if(companyTypes.size()>0){
            companyTypes.forEach(one->{
            companyTypes.forEach(one->{
                IotCompanyTypeVO vo = new IotCompanyTypeVO();
                IotCompanyTypeDO vo = new IotCompanyTypeDO();
                vo.setType(one.getType());
                vo.setType(one.getType());
                vo.setTypeName(one.getTypeName());
                vo.setTypeName(one.getTypeName());
                list.add(vo);
                list.add(vo);