Browse Source

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

wangzhinan 4 years ago
parent
commit
2a62d65a7a

+ 25 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerDoctorService.java

@ -32,6 +32,7 @@ import javax.transaction.Transactional;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.jdbc.core.JdbcTemplate;
@ -56,7 +57,12 @@ public class BaseBannerDoctorService
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Value("${wechat.id}")
    private String wxId;
    @Value("${wechat.flag}")
    private boolean flag;
    @Transactional
    public ObjEnvelop bannerGive(String patientId, List<String> list, String content, String doctor, String doctorName, Integer type, String key, String value)
            throws IOException
@ -295,7 +301,15 @@ public class BaseBannerDoctorService
        Date date = new Date();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        String strDate = format.format(date);
        sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
        if("xm_ykyy_wx".equals(wxId)){
            if (flag){
                sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
            }else {
                sql.append(" and t.create_time > to_date('" + strDate + " 00:00:00', 'yyyy-mm-dd hh24:mi:ss') and t.create_time< to_date('" + strDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')");
            }
        }else{
            sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
        }
        sql.append(" group by t.relation_code,t.patient_id");
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("banner_gives_times");
@ -386,7 +400,16 @@ public class BaseBannerDoctorService
        Date date = new Date();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        String strDate = format.format(date);
        sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
        System.out.println(wxId+flag);
        if("xm_ykyy_wx".equals(wxId)){
            if (flag){
                sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
            }else {
                sql.append(" and t.create_time > to_date('" + strDate + " 00:00:00', 'yyyy-mm-dd hh24:mi:ss') and t.create_time< to_date('" + strDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')");
            }
        }else{
            sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
        }
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_times");
        long countTimes = 5L;

+ 10 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseUserMsgService.java

@ -505,7 +505,16 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
        Date date = new Date();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        String strDate = format.format(date);
        sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
        System.out.println(wxId+flag);
        if("xm_ykyy_wx".equals(wxId)){
            if (flag){
                sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
            }else {
                sql.append(" and t.create_time > to_date('" + strDate + " 00:00:00', 'yyyy-mm-dd hh24:mi:ss') and t.create_time< to_date('" + strDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss')");
            }
        }else{
            sql.append(" and t.create_time > '" + strDate + " 00:00:00' and t.create_time<'" + strDate + " 23:59:59'");
        }
        List<Map<String, Object>> list = this.hibenateUtils.createSQLQuery(sql.toString());
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_times");
        long countTimes = 5L;

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -19,13 +19,13 @@ public abstract class IntegerIdentityEntity implements Serializable {
    @Id
//==========mysql 环境 id策略======================================================
    @GeneratedValue(generator = "generator")
    /*@GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "identity")
    @Column(name = "id", unique = true, nullable = false)
    @Column(name = "id", unique = true, nullable = false)*/
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
  /* @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 1 - 10
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java

@ -93,7 +93,7 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
    @GetMapping(value = SpecialistMapping.rehabilitation.findTemplateDetailByTemplateId)
    @ApiOperation(value = "获取康复服务套餐模板明细")
    public ListEnvelop findTemplateDetailByTemplateId(@ApiParam(name = "templateId", value = "模板id")
                                                                                      @RequestParam(value = "templateId", required = true)String templateId){
                                                      @RequestParam(value = "templateId", required = true)String templateId){
        try {
            return rehabilitationPlanService.findTemplateDetailByTemplateId(templateId);
        }catch (Exception e){
@ -138,15 +138,9 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
                                                                       @RequestParam(value = "rehabilitationPlan", required = true)String rehabilitationPlan){
        try {
            JSONObject json = new JSONObject(rehabilitationPlan);
            if(json.has("totalExpense")) {
                json.put("totalExpense", (DataUtils.doubleToInt(json.getDouble("totalExpense"))));
            }
            JSONArray array = new JSONArray();
            for(Object planDetail : json.getJSONArray("detail")) {
                JSONObject j = (JSONObject)planDetail;
                if(j.has("expense")){
                    j.put("expense", (DataUtils.doubleToInt(j.getDouble("expense"))));
                }
                if(j.has("executeTime")) {
                    String executeTime = j.get("executeTime").toString();
                    String[] result = null;
@ -382,9 +376,6 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
            JSONArray array = new JSONArray();
            for(Object planDetail : json.getJSONArray("detail")) {
                JSONObject j = (JSONObject)planDetail;
                if(j.has("expense")){
                    j.put("expense", (DataUtils.doubleToInt(j.getDouble("expense"))));
                }
                if(j.has("executeTime")) {
                    String executeTime = j.get("executeTime").toString();
                    String[] result = null;

+ 48 - 42
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -378,57 +378,63 @@ public class RehabilitationManageService {
                m = map.get(executeTime);
                Map<String,Integer> family = null;
                Map<String,Integer> specialist = null;
                if((Integer)one.get("type")==1){//家庭医生
                    if(m.containsKey("family")){
                        family = (Map<String,Integer>)m.get("family");
                    }else{
                        family = new HashMap<>();
                        family.put("all",0);
                        family.put("finish",0);
                    }
                    if((Integer)one.get("status")==1){
                        family.put("finish",family.get("finish")+1);
                    }
                    family.put("all",family.get("all")+1);
                    m.put("family",family);
                }else if((Integer)one.get("type")==2){//专科医生
                if(one.get("type")!=null){
                    if((Integer)one.get("type")==1){//家庭医生
                        if(m.containsKey("family")){
                            family = (Map<String,Integer>)m.get("family");
                        }else{
                            family = new HashMap<>();
                            family.put("all",0);
                            family.put("finish",0);
                        }
                        if((Integer)one.get("status")==1){
                            family.put("finish",family.get("finish")+1);
                        }
                        family.put("all",family.get("all")+1);
                        m.put("family",family);
                    }else if((Integer)one.get("type")==2){//专科医生
                    if(m.containsKey("specialist")){
                        if(m.containsKey("specialist")){
                        specialist = (Map<String,Integer>)m.get("specialist");
                    }else{
                        specialist = new HashMap<>();
                        specialist.put("all",0);
                        specialist.put("finish",0);
                    }
                    if((Integer)one.get("status")==1){
                        specialist.put("finish",(specialist.get("finish"))+1);
                            specialist = (Map<String,Integer>)m.get("specialist");
                        }else{
                            specialist = new HashMap<>();
                            specialist.put("all",0);
                            specialist.put("finish",0);
                        }
                        if((Integer)one.get("status")==1){
                            specialist.put("finish",(specialist.get("finish"))+1);
                        }
                        specialist.put("all",(specialist.get("all"))+1);
                        m.put("specialist",specialist);
                    }
                    specialist.put("all",(specialist.get("all"))+1);
                    m.put("specialist",specialist);
                }
            }else{
                m = new HashMap<>();
//                m.put("specialist",new HashMap<String,Object>());
                if((Integer)one.get("type")==1){//家庭医生
                    Map<String,Integer> family = new HashMap<>();
                    family.put("all",0);
                    family.put("finish",0);
                    if((Integer)one.get("status")==1){
                        family.put("finish",family.get("finish")+1);
                    }
                    family.put("all",family.get("all")+1);
                    m.put("family",family);
                }else if((Integer)one.get("type")==2){//专科医生
                    Map<String,Integer> specialist = new HashMap<>();
                    specialist.put("all",0);
                    specialist.put("finish",0);
                    if((Integer)one.get("status")==1){
                        specialist.put("finish",specialist.get("finish")+1);
                if(one.get("type")!=null){
                    if((Integer)one.get("type")==1){//家庭医生
                        Map<String,Integer> family = new HashMap<>();
                        family.put("all",0);
                        family.put("finish",0);
                        if((Integer)one.get("status")==1){
                            family.put("finish",family.get("finish")+1);
                        }
                        family.put("all",family.get("all")+1);
                        m.put("family",family);
                    }else if((Integer)one.get("type")==2){//专科医生
                        Map<String,Integer> specialist = new HashMap<>();
                        specialist.put("all",0);
                        specialist.put("finish",0);
                        if((Integer)one.get("status")==1){
                            specialist.put("finish",specialist.get("finish")+1);
                        }
                        specialist.put("all",specialist.get("all")+1);
                        m.put("specialist",specialist);
                    }
                    specialist.put("all",specialist.get("all")+1);
                    m.put("specialist",specialist);
                }
            }
            //myTaskFlag,1:有自己任务,0:没有自己任务
            if(StringUtils.isNotEmpty(doctorCode)){