大件运输联网系统后端代码
guoshilong
2022-12-15 2853852855d3a2ec606998c046470277a0773ed0
修改申请增改逻辑
3 files modified
23 ■■■■■ changed files
src/main/java/org/springblade/modules/application/mapper/ApplicationMapper.xml 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/application/service/impl/ApplicationServiceImpl.java 13 ●●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/application/mapper/ApplicationMapper.xml
@@ -29,7 +29,13 @@
    <select id="selectApplicationPage" resultType="org.springblade.modules.application.vo.ApplicationVO">
        select app.*,CONCAT(car.car_license,car.trailer_license) licensePlate,
        select app.*,
        (
        CASE
            WHEN car.trailer_license IS NOT NULL
        THEN CONCAT( car.car_license, car.trailer_license )
            ELSE car.car_license
        END) licensePlate,
        goods.goods_name,
        enterprise.enterprise_name,
        enterprise.legal_person
src/main/java/org/springblade/modules/application/service/impl/ApplicationServiceImpl.java
@@ -87,18 +87,19 @@
        GoodsEntity goods = goodsService.getOne(Condition.getQueryWrapper(new GoodsEntity(applicationId)));
        applicationVO.setGoodsEntity(goods);
        applicationVO.setGoodsEntity(goods);
        applicationVO.setGoodsName(goods.getGoodsName());
        return applicationVO;
    }
    @Override
    @Transactional
    public Boolean updateVoById(ApplicationEntity application, BasicInfoEntity basicInfoEntity, CarEntity carEntity, PlanEntity planEntity, SchemeEntity schemeEntity, GoodsEntity goodsEntity) {
//        basicInfoEntity.setId(application.getBasicInfoId());
//        carEntity.setId(application.getCarId());
//        planEntity.setId(Long.parseLong(application.getPlanId()));
//        schemeEntity.setId(Long.parseLong(application.getSchemeId()));
//        goodsEntity.setId(application.getGoodsId());
        String applicationId = application.getId().toString();
        basicInfoEntity.setId(basicInfoService.getOne(Condition.getQueryWrapper(new BasicInfoEntity(applicationId))).getId());
        carEntity.setId(carService.getOne(Condition.getQueryWrapper(new CarEntity(applicationId))).getId());
        planEntity.setId(planService.getOne(Condition.getQueryWrapper(new PlanEntity(applicationId))).getId());
        schemeEntity.setId(schemeService.getOne(Condition.getQueryWrapper(new SchemeEntity(applicationId))).getId());
        goodsEntity.setId(goodsService.getOne(Condition.getQueryWrapper(new GoodsEntity(applicationId))).getId());
        boolean b = basicInfoService.updateById(basicInfoEntity);
        boolean c = carService.updateById(carEntity);
src/main/resources/application-dev.yml
@@ -13,7 +13,7 @@
    #  commandTimeout: 5000
  datasource:
    # MySql
    url: jdbc:mysql://localhost:3306/approval-system?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    url: jdbc:mysql://192.168.0.116:3306/approval-system?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    username: root
    password: 123456
    # PostgreSQL