瀏覽代碼

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

叶仕杰 4 年之前
父節點
當前提交
d0e226a62b

+ 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;