Prechádzať zdrojové kódy

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

liuwenbin 7 rokov pred
rodič
commit
0860fc4a21

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/SwaggerConfig.java

@ -176,6 +176,7 @@ public class SwaggerConfig {
                        regex("/nofilter/.*"),
                        regex("/idc10/.*"),
                        regex("/im_new/.*"),
                        regex("/dataHandling/.*"),
                        regex("/version/.*"),
                        regex("/express/.*"),
                        regex("/doctorFeedback/.*"),

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/manage/UserDao.java

@ -9,7 +9,7 @@ import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by chenweida on 2017/12/26.
 */
public interface UserDao  extends PagingAndSortingRepository<User, Integer>,JpaSpecificationExecutor<User> {
public interface UserDao  extends PagingAndSortingRepository<User, Long>,JpaSpecificationExecutor<User> {
    @Query("from User where code=?1")
    User findByCode(String code);
}

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -122,6 +122,9 @@ public class JMJkEduArticleService extends BaseService {
        HealthEduArticlePatientModel heapm = null;
        com.alibaba.fastjson.JSONObject article = null;
        Doctor doctor = null;
    
        List<HealthEduArticlePatientModel> resultList = new ArrayList<>();
        
        for (HealthEduArticlePatient one : esList) {
            article = thirdJkEduArticleService.getArticalById(one.getArticleId(),"");
            if (result.get(one.getArticleId()) != null) {
@ -160,12 +163,9 @@ public class JMJkEduArticleService extends BaseService {
            heapm.setPhoto(doctor.getPhoto());
            heapm.setOperatorName(article.getString("operatorName"));
            // heapm.setTime();//时间  xx小时前  2017-10-11
            resultList.add(heapm);
            result.put(one.getArticleId(), heapm);
        }
        List<HealthEduArticlePatientModel> resultList = new ArrayList<>();
//        for (Map.Entry<String, HealthEduArticlePatientModel> entry : result.entrySet()) {
//            resultList.add(entry.getValue());
//        }
        return resultList;
    }

+ 13 - 9
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java

@ -66,13 +66,12 @@ public class DataHandingService {
        doctorDao.save(doctors);
        return "更新患者(默认身份证后六位):"+patientCount+",有身份证异常的患者:"+patientErrorCount+",更新医生(默认电话后六位):"+doctorCount+",有电话号码异常的医生:"+doctorErrorCount;
    }
    @Transactional
    public String initWLyyDoctorTable2WLyyUserTable() {
        JSONObject returnjo = new JSONObject();
        List<Doctor> doctors = doctorDao.findAllDoctors();
        List<String> errorCodes = new ArrayList<>();
        Integer success = 0;
        Integer error = 0;
        Integer success = 0;
        Integer exsit = 0;
        for (Doctor doctor : doctors) {
            try {
@ -82,13 +81,7 @@ public class DataHandingService {
                    exsit++;
                    continue;
                }
                User userTemp = new User();
                user.setCode(doctor.getCode());
                user.setMobile(doctor.getMobile());
                user.setName(doctor.getName());
                user.setCzrq(new Date());
                user.setType(2); //医生
                userDao.save(userTemp);
                saveUser(doctor);
                success++;
            } catch (Exception e) {
                error++;
@ -101,4 +94,15 @@ public class DataHandingService {
        returnjo.put("errorCode", errorCodes);//转移失败的医生code
        return returnjo.toString();
    }
    @Transactional
    private void saveUser(Doctor doctor) {
        User userTemp = new User();
        userTemp.setCode(doctor.getCode());
        userTemp.setMobile(doctor.getMobile());
        userTemp.setName(doctor.getName());
        userTemp.setCzrq(new Date());
        userTemp.setType(2); //医生
        userDao.save(userTemp);
    }
}

+ 9 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -4,6 +4,8 @@ import com.yihu.wlyy.entity.organization.HospitalDept;
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
import com.yihu.wlyy.service.app.sign.FamilyContractService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
@ -20,7 +22,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
 * 修改历史数据处理控制器
 */
@Controller
@RequestMapping(value = "/dataHandling", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@Api(description = "修改历史数据处理控制器")
@RequestMapping(value = "/dataHandling", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class DataHandlingController extends BaseController {
    @Autowired
@ -32,7 +35,7 @@ public class DataHandlingController extends BaseController {
    /**
     * 生成签约表中的行政团队的code
     */
    @RequestMapping(value = "produceSignAdminTeamCode")
    @RequestMapping(value = "produceSignAdminTeamCode",method =RequestMethod.GET)
    @ResponseBody
    public String produceSignAdminTeamCode() {
        try {
@ -47,7 +50,7 @@ public class DataHandlingController extends BaseController {
     * 生成咨询表中中的行政团队的code
     * @return
     */
    @RequestMapping(value = "produceConsultAdminTeamCode")
    @RequestMapping(value = "produceConsultAdminTeamCode",method =RequestMethod.GET)
    @ResponseBody
    public String produceConsultAdminTeamCode() {
        try {
@ -62,7 +65,8 @@ public class DataHandlingController extends BaseController {
     * 生成医生和患者表中有身份的用户的密码
     * @return
     */
    @RequestMapping(value = "producePatientAndDoctorPassword")
    @ApiOperation("生成医生和患者表中有身份的用户的密码")
    @RequestMapping(value = "producePatientAndDoctorPassword",method =RequestMethod.GET)
    @ResponseBody
    public String producePatientAndDoctorPasswor() {
        try {
@ -76,6 +80,7 @@ public class DataHandlingController extends BaseController {
     * 初始化wlyy_doctor的数据到wlyy_user
     * @return
     */
    @ApiOperation("初始化wlyy_doctor的数据到wlyy_user")
    @RequestMapping(value = "initWLyyDoctorTable2WLyyUserTable",method = RequestMethod.GET)
    @ResponseBody
    public String initWLyyDoctorTable2WLyyUserTable() {