|
|
|
|
@ -7,9 +7,11 @@ import com.emr.dao.emrPdfWaterSet.EmrPdfWaterSetMapper;
|
|
|
|
|
import com.emr.entity.EmrComomSet;
|
|
|
|
|
import com.emr.entity.Power_User;
|
|
|
|
|
import com.emr.entity.ResultUtil;
|
|
|
|
|
import com.emr.entity.approve.Emr_Apply_Approve;
|
|
|
|
|
import com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet;
|
|
|
|
|
import com.emr.entity.tScanAssort.T_Scan_Assort;
|
|
|
|
|
import com.emr.service.tScanAssort.T_Scan_AssortService;
|
|
|
|
|
import com.emr.util.DateUtils;
|
|
|
|
|
import com.emr.util.img2PdfUtil;
|
|
|
|
|
import com.emr.vo.User;
|
|
|
|
|
import com.emr.vo.commomSearch.CommomVo;
|
|
|
|
|
@ -19,6 +21,7 @@ import org.apache.http.client.methods.CloseableHttpResponse;
|
|
|
|
|
import org.apache.http.client.methods.HttpGet;
|
|
|
|
|
import org.apache.http.impl.client.HttpClients;
|
|
|
|
|
import org.apache.http.util.EntityUtils;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@ -676,4 +679,30 @@ public class CommomService {
|
|
|
|
|
}
|
|
|
|
|
return loadingPerson;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量添加
|
|
|
|
|
* @param tableName
|
|
|
|
|
* @param commomMapper
|
|
|
|
|
* @param operList
|
|
|
|
|
*/
|
|
|
|
|
public void simpleInsert(String tableName,CommomMapper commomMapper,List operList){
|
|
|
|
|
if(!CollectionUtils.isEmpty(operList)) {
|
|
|
|
|
///查询表列数
|
|
|
|
|
int colCount = commomMapper.selectColByTableName(tableName);
|
|
|
|
|
List list = new ArrayList();
|
|
|
|
|
int simpleInsertCount = 2100 / colCount;
|
|
|
|
|
for (int i = 0; i < operList.size(); i++) {
|
|
|
|
|
//处理批量添加sql太长问题,设定个数为180
|
|
|
|
|
if (i > 0 && list.size() % simpleInsertCount == 0) {
|
|
|
|
|
list.clear();
|
|
|
|
|
}
|
|
|
|
|
list.add(operList.get(i));
|
|
|
|
|
//是180的倍数或最后一个
|
|
|
|
|
if (list.size() % simpleInsertCount == 0 || i == operList.size() - 1) {
|
|
|
|
|
commomMapper.SimpleInsert(list);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|