|
@ -119,7 +119,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
public void saveQRCode(String token,String prescriptionCode) throws Exception {
|
|
|
public void saveQRCode(String prescriptionCode) throws Exception {
|
|
|
Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
|
|
|
//取药类型:1 自取 2快递配送 3健管师配送
|
|
|
Integer type = prescription.getDispensaryType();
|
|
@ -127,7 +127,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
|
|
|
PrescriptionDispensaryCode p1 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,1);
|
|
|
if(p1==null){
|
|
|
|
|
|
p1 = savePatientQRCode(token,prescriptionCode);
|
|
|
p1 = savePatientQRCode(prescriptionCode);
|
|
|
}
|
|
|
if(p1==null){
|
|
|
throw new Exception("二维码生成失败!");
|
|
@ -136,7 +136,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
|
|
|
PrescriptionDispensaryCode p2 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,2);
|
|
|
if(p2==null){
|
|
|
|
|
|
p2 = saveQRCode(p1.getCode(),token,prescriptionCode,2);
|
|
|
p2 = saveQRCode(p1.getCode(),prescriptionCode,2);
|
|
|
}
|
|
|
if(p2==null){
|
|
|
throw new Exception("二维码生成失败!");
|
|
@ -144,7 +144,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
|
|
|
PrescriptionDispensaryCode p3 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,3);
|
|
|
if(p3==null){
|
|
|
|
|
|
p3 = saveQRCode(p1.getCode(),token,prescriptionCode,3);
|
|
|
p3 = saveQRCode(p1.getCode(),prescriptionCode,3);
|
|
|
}
|
|
|
if(p3==null){
|
|
|
throw new Exception("二维码生成失败!");
|
|
@ -154,7 +154,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
|
|
|
|
|
|
//生成居民端取药码
|
|
|
@Transactional
|
|
|
public PrescriptionDispensaryCode savePatientQRCode(String token,String prescriptionCode) throws Exception {
|
|
|
public PrescriptionDispensaryCode savePatientQRCode(String prescriptionCode) throws Exception {
|
|
|
//获取年月日8位数
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
String year = String.valueOf(cal.get(Calendar.YEAR));
|
|
@ -192,7 +192,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
|
|
|
|
|
|
//生成配送员(健管师)(2、取药码 2、配送码)
|
|
|
@Transactional
|
|
|
public PrescriptionDispensaryCode saveQRCode(String code,String token,String prescriptionCode,Integer type) throws Exception {
|
|
|
public PrescriptionDispensaryCode saveQRCode(String code,String prescriptionCode,Integer type) throws Exception {
|
|
|
String jgsCode= "";
|
|
|
synchronized (obj2){
|
|
|
boolean bl = true;
|