소스 검색

Merge branch 'dev' of yeshijie/wlyy2.0 into dev

叶仕杰 4 년 전
부모
커밋
017af8aaf3

+ 41 - 37
svr/svr-door-serivce/pom.xml

@ -157,13 +157,30 @@
    <build>
        <finalName>svr-door-service</finalName>
        <plugins>
            <!-- 分离lib -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <!-- 是否要把第三方jar加入到类构建路径 -->
                            <addClasspath>true</addClasspath>
                            <!-- 外部依赖jar包的最终位置 -->
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.yihu.SvrDoorServiceApplication</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <!--拷贝依赖到jar外面的lib目录-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <id>copy-lib</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
@ -178,56 +195,43 @@
                    </execution>
                </executions>
            </plugin>
            <!-- copy资源文件 -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                            <outputDirectory>${project.build.directory}/resources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- 打jar包时忽略配置文件 -->
            <!--指定配置文件,将resources打成外部resource-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- 指定配置文件目录,这样jar运行时会去找到同目录下的resources文件夹下查找 -->
                        <manifestEntries>
                            <Class-Path>resources/</Class-Path>
                        </manifestEntries>
                    </archive>
                    <!-- 打包时忽略的文件(也就是不打进jar包里的文件) -->
                    <excludes>
                        <exclude>**/*.yml</exclude>
                        <exclude>**/*.xml</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- spring boot repackage -->
            <!-- 拷贝资源文件 外面的resource目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <layout>ZIP</layout>
                    <includes>
                        <include>
                            <groupId>non-exists</groupId>
                            <artifactId>non-exists</artifactId>
                        </include>
                    </includes>
                </configuration>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>repackage</goal>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <!-- 资源文件输出目录 -->
                            <outputDirectory>${project.build.directory}/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

+ 19 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/DoorOrderController.java

@ -1377,4 +1377,23 @@ public class DoorOrderController extends BaseController {
        return null;
    }
    @ApiOperation("医生修改上门服务项")
    @RequestMapping(value = "updServiceItems" , method = RequestMethod.POST)
    public String updServiceItems(   @ApiParam(value = "医生code", name = "doctor")
                                         @RequestParam(value = "doctor", required = true) String doctor,
                                         @ApiParam(value = "工单id", name = "orderId")
                                         @RequestParam(value = "orderId", required = false) String orderId,
                                         @ApiParam(name = "level", value = "医院等级,1.三级医院,2.二级医院,3.一级及以下")
                                         @RequestParam(value = "level",required = true)Integer level ){
        try {
            return write(200, "修改成功", "data", "");
        }catch (Exception e){
            e.printStackTrace();
        }
        return write(-1,"修改失败");
    }
}

+ 6 - 4
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/patient/WlyyDoorServiceOrderController.java

@ -75,7 +75,7 @@ public class WlyyDoorServiceOrderController extends EnvelopRestEndpoint {
        if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
            return failed(result.getString(ResponseContant.resultMsg));
        }
        return success(result.get(ResponseContant.resultMsg));
        return success(result);
    }
    @PostMapping(value = "delete")
@ -319,11 +319,13 @@ public class WlyyDoorServiceOrderController extends EnvelopRestEndpoint {
    @PostMapping(value = "payServiceItemFees")
    @ApiOperation("付服务项费用")
    public Envelop payServiceItemFees(@ApiParam(name = "ids", value = "订单id",required = true)
    public Envelop payServiceItemFees(@ApiParam(name = "orderId", value = "订单id",required = true)
                                          @RequestParam String orderId,
                                      @ApiParam(name = "ids", value = "订单id",required = true)
                                      @RequestParam String[] ids) {
        try {
            wlyyDoorServiceOrderService.payServiceItemFees(ids);
            return success();
            JSONObject json = wlyyDoorServiceOrderService.payServiceItemFees(ids,orderId);
            return success(json);
        } catch (Exception e) {
            return failed(e.getMessage());
        }

+ 1 - 1
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorOrderService.java

@ -301,7 +301,7 @@ public class DoorOrderService {
     * @return
     */
    public List<Map<String, Object>> getDoorFeeDetailGroupByStatus(String orderId) {
        String sql = "SELECT d.id, d.status,d.name,d.code,sum(d.number) num,fee,sum(d.number)*fee sum from wlyy_door_fee_detail d where order_id=? and type=1 GROUP BY status,code";
        String sql = "SELECT d.id, d.status, d.pay_status payStatus,d.name,d.code,sum(d.number) num,fee,sum(d.number)*fee sum from wlyy_door_fee_detail d where order_id=? and type=1 GROUP BY status,code";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, orderId);
        return list;
    }

+ 18 - 8
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorServiceOrderService.java

@ -277,7 +277,9 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
                }else{
                    feeDetailDO.setStatus(status);
                }
                feeDetailDO.setPayStatus(0);
                if(StringUtils.isBlank(feeDetailDO.getId())){
                    feeDetailDO.setPayStatus(0);
                }
//                feeDetailDO.setNumber(1);
                feeDetailDO.setOrderId(order.getId());
                if(StringUtils.isBlank(feeDetailDO.getId())) {
@ -344,11 +346,12 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
            for(Object oneId : itemArray) {
                JSONObject oneIdJson = (JSONObject) oneId;
                WlyyDoorFeeDetailDO doorFeeDetail = wlyyDoorFeeDetailDao.findOne(String.valueOf(oneIdJson.get("id")));
                doorFeeDetail.setStatus(3);
                doorFeeDetail.setUpdateTime(new Date());
                list.add(doorFeeDetail);
                itemFee = itemFee.add(doorFeeDetail.getFee().multiply(BigDecimal.valueOf(doorFeeDetail.getNumber())));
                if(doorFeeDetail.getPayStatus()==0){
                    doorFeeDetail.setStatus(3);
                    doorFeeDetail.setUpdateTime(new Date());
                    list.add(doorFeeDetail);
                    itemFee = itemFee.add(doorFeeDetail.getFee().multiply(BigDecimal.valueOf(doorFeeDetail.getNumber())));
                }
            }
            wlyyDoorFeeDetailDao.save(list);
//            orderDO.setTotalFee(totalFee.subtract(itemFee));
@ -625,7 +628,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        }
        orderDO.setServiceStatus("1");
        this.save(orderDO);
        result.put("orderId",orderDO.getId());
        //创建咨询
        JSONObject successOrNot = null;
        try {
@ -2948,7 +2951,14 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
    }
    @Transactional
    public void payServiceItemFees(String[] ids){
    public JSONObject payServiceItemFees(String[] ids,String orderId){
        JSONObject json = new JSONObject();
        wlyyDoorFeeDetailDao.updatePayStatusById(ids);
//        WlyyDoorServiceOrderDO orderDO = wlyyDoorServiceOrderDao.findOne(orderId);
        ConsultDo consult = consultDao.queryByRelationCode(orderId);
        json.put("patient",consult.getPatient());
        json.put("consult",consult.getId());
        return json;
    }
}

+ 0 - 3
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/common/ServerPackageService.java

@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
@ -22,8 +21,6 @@ import java.util.Map;
@Transactional
public class ServerPackageService  {
    private static org.slf4j.Logger logger = LoggerFactory.getLogger(ServerPackageService.class);
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Value("${wechat.id}")