| | |
| | | TjCustomer customer = customerService.getById(tjOrder.getUserId()); |
| | | if (null != customer) { |
| | | customer.setCusNumber(customer.getCusNumber() + 1); |
| | | customer.setCardId("0"); |
| | | if (customerService.updateById(customer)) { |
| | | asyncService.updateCheckType(tjNumber); |
| | | return AjaxResult.success("操作成功"); |
| | |
| | | String hospbm = sysConfigService.selectConfigByKey("common_api_service_hospbm"); |
| | | HashMap<String, Object> isjd = new HashMap<>(); |
| | | isjd.put("cusIdCard",tjCustomer.getCusIdcard()); |
| | | // isjd.put("compId",tjCustomer.getCompId()); |
| | | isjd.put("compId",""); |
| | | String isCreat = HttpClientUtils.sendPost(apiUrl+"/api/his/"+hospbm+"/isCreat", isjd); |
| | | JSONObject isCreatjsonObject = JSONUtil.parseObj(isCreat); |
| | | if (isCreatjsonObject.getStr("code").equals("200")){ |
| | |
| | | map.put("cusName",tjCustomer.getCusName()); |
| | | map.put("cusSex",tjCustomer.getCusSex()); |
| | | map.put("cusIdCard",tjCustomer.getCusIdcard()); |
| | | map.put("compId",tjCustomer.getCompId()); |
| | | map.put("compId",""); |
| | | map.put("cusBrithday",tjCustomer.getCusBrithday() != null ? DateUtil.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd") : ""); |
| | | map.put("cusAddr",tjCustomer.getCusAddr()); |
| | | map.put("cusPhone",tjCustomer.getCusPhone()); |
| | | map.put("compName",tjCustomer.getCompName()); |
| | | map.put("compName",""); |
| | | String post = HttpClientUtils.sendPost(apiUrl+"/api/his/"+hospbm+"/creat", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("code").equals("200")){ |
| | |
| | | map.put("cusName",tjCustomer.getCusName()); |
| | | map.put("cusSex",tjCustomer.getCusSex()); |
| | | map.put("cusIdCard",tjCustomer.getCusIdcard()); |
| | | map.put("compId",tjCustomer.getCompId()); |
| | | map.put("compId",""); |
| | | map.put("cusBrithday",tjCustomer.getCusBrithday() != null ? DateUtil.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd") : ""); |
| | | map.put("cusAddr",tjCustomer.getCusAddr()); |
| | | map.put("cusPhone",tjCustomer.getCusPhone()); |
| | | map.put("compName",tjCustomer.getCompName()); |
| | | map.put("compName",""); |
| | | String isCreat = HttpClientUtils.sendPost(apiUrl+"/api/his/"+hospbm+"/update", map); |
| | | JSONObject isCreatjsonObject = JSONUtil.parseObj(isCreat); |
| | | if (isCreatjsonObject.getStr("code").equals("200")){ |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import jodd.util.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import net.sf.ehcache.constructs.scheduledrefresh.OverseerJob; |
| | | import org.apache.ibatis.session.SqlSession; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @RestController |
| | | @RequestMapping("/hosp/project") |
| | | @Api(tags = "体检项目管理") |
| | | @Slf4j |
| | | public class TjProjectController extends BaseController { |
| | | @Resource |
| | | private ITjProjectService tjProjectService; |
| | |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/plxgpym") |
| | | @ApiOperation(value = "批量修改拼音码") |
| | | public AjaxResult plxgpym(@RequestParam String tbname,@RequestParam String zd,@RequestParam String pymzd) { |
| | | String sql="SELECT 1"; |
| | | try { |
| | | sql="SELECT "+ zd +","+ pymzd +" FROM "+tbname; |
| | | |
| | | List<Map<String,Object>> projectList = tjProjectService.zdysqlcx(sql); |
| | | if(null !=projectList && !projectList.isEmpty()){ |
| | | for (Map<String, Object> map : projectList) { |
| | | Object zd1 = map.get("zd"); |
| | | if(null !=zd1 && StringUtil.isNotBlank(zd1.toString())){ |
| | | String letter = PinyinUtil.getFirstLetter(zd1.toString(), ""); |
| | | sql="UPDATE "+ tbname +" "+ " set " +pymzd+" = "+ letter; |
| | | tjProjectService.zdysqlxg(sql); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(projectList); |
| | | } catch (Exception e) { |
| | | log.info("sql查询失败"+ sql); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @GetMapping("/tuanDuiYiChangBySex") |
| | | @ApiOperation(value = "生成团队体检报告——男女异常结果统计") |
| | | public Map<String, List<Map<String, Object>>> tuanDuiYiChangBySex(@ApiParam(value = "单位") @RequestParam String firmId, |
| | | @ApiParam(value = "部门") @RequestParam String firmDeptId) { |
| | | public Map<String, List<Map<String, Object>>> tuanDuiYiChangBySex(@ApiParam(value = "单位") @RequestParam String dwname) { |
| | | |
| | | Map<String, List<Map<String, Object>>> all = new HashMap<>(); |
| | | |
| | | LambdaQueryWrapper<TjOrder> wq2 = new LambdaQueryWrapper<>(); |
| | | wq2.eq(TjOrder::getFirmId, firmId); |
| | | wq2.eq(TjOrder::getFirmDeptId, firmDeptId); |
| | | wq2.eq(TjOrder::getTjType, "1"); |
| | | wq2.in(TjOrder::getStatus, 401, 402); |
| | | wq2.eq(TjOrder::getFirmName,dwname); |
| | | wq2.ne(TjOrder::getTjType, "2"); |
| | | // wq2.in(TjOrder::getStatus, 401, 402); |
| | | final List<TjOrder> list = tjOrderService.list(wq2); |
| | | |
| | | List<String> tjNumberList = list.stream().map(TjOrder::getTjNumber).collect(Collectors.toList()); |
| | |
| | | LambdaQueryWrapper<TjGroupingPro> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjGroupingPro::getGroupingId, groupingId); |
| | | List<TjGroupingPro> proList = groupingProService.list(wq); |
| | | if (null != proList && proList.size() > 0) { |
| | | if (null != proList && !proList.isEmpty()) { |
| | | for (TjGroupingPro groupingPro : proList) { |
| | | TjProject project = projectService.getById(groupingPro.getProId()); |
| | | if (null != project) { |
| | | if (project.getProType() == null || project.getProType().equals("")) { |
| | | if (project.getProType() == null || project.getProType().isEmpty()) { |
| | | groupingPro.setProType("2"); |
| | | } else { |
| | | groupingPro.setProType(project.getProType()); |
| | |
| | | |
| | | List<List<?>> getTjHyBgList(Map<String,Object> map); |
| | | |
| | | |
| | | // @Select("SELECT #{sql}") |
| | | List<Map<String, Object>> zdysqlcx(Map<String,Object> map); |
| | | |
| | | void zdysqlxg(Map<String,Object> map); |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | Map<String,Object> getTjHyBgList(Integer page,Integer pageSize,String pname,String pid,String pym,String checktype); |
| | | |
| | | List<Map<String, Object>> zdysqlcx(String sql); |
| | | void zdysqlxg(String sql); |
| | | } |
| | |
| | | return map1; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> zdysqlcx(String sql) { |
| | | Map<String,Object> map=new HashMap<>(); |
| | | map.put("aaa",sql); |
| | | return tjProjectMapper.zdysqlcx(map); |
| | | } |
| | | |
| | | @Override |
| | | public void zdysqlxg(String sql) { |
| | | Map<String,Object> map=new HashMap<>(); |
| | | map.put("aaa",sql); |
| | | tjProjectMapper.zdysqlxg(map); |
| | | } |
| | | |
| | | } |
| | |
| | | where pro_id = #{proId} |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteTjProjectByProId" parameterType="Long"> |
| | | delete |
| | | from tj_project |
| | |
| | | #{total,mode=OUT,jdbcType=INTEGER} |
| | | )} |
| | | </select> |
| | | <select id="zdysqlcx" parameterType="java.util.Map" statementType="CALLABLE" resultType="java.util.Map"> |
| | | {call tj_zdysqlcx( |
| | | #{aaa,mode=IN,jdbcType=VARCHAR} |
| | | )} |
| | | |
| | | </select> |
| | | <select id="zdysqlxg" parameterType="java.util.Map" statementType="CALLABLE" resultType="java.util.Map"> |
| | | {call tj_zdysqlxg( |
| | | #{aaa,mode=IN,jdbcType=VARCHAR} |
| | | )} |
| | | </select> |
| | | </mapper> |