机具库存收藏修改
This commit is contained in:
parent
1c784481c0
commit
9c92ac8f79
|
|
@ -15,12 +15,12 @@ import java.util.Hashtable;
|
|||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.scrap.service.ScrapApplyService;
|
||||
import com.lowagie.text.List;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -228,7 +228,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes getMachineStatus() {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> result = service.getMachineStatus();
|
||||
List<MachineBean> result = service.getMachineStatus();
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -288,7 +288,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public void exportModelExcel(HttpServletRequest request, HttpServletResponse response, MachineBean o) {
|
||||
try {
|
||||
String filename = "设备入库模板";
|
||||
com.lowagie.text.List<String> headers = reportHeader1();
|
||||
List<String> headers = reportHeader1();
|
||||
HSSFWorkbook workbook = POIOutputHelper.excel(null, headers, filename);
|
||||
OutputStream out = null;
|
||||
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
||||
|
|
@ -304,7 +304,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
}
|
||||
}
|
||||
|
||||
private com.lowagie.text.List<String> reportHeader1() {
|
||||
private List<String> reportHeader1() {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
list.add("序号");
|
||||
list.add("机具名称");
|
||||
|
|
@ -339,7 +339,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findPhotoList(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> result = service.findPhotoList(o);
|
||||
List<MachineBean> result = service.findPhotoList(o);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -355,7 +355,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findOptPhotoList(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> result = service.findOptPhotoList(o);
|
||||
List<MachineBean> result = service.findOptPhotoList(o);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -371,7 +371,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findFileList(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> result = service.findFileList(o);
|
||||
List<MachineBean> result = service.findFileList(o);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -387,7 +387,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findMachineType(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> list = service.findMachineType(o);
|
||||
List<MachineBean> list = service.findMachineType(o);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", list);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -403,7 +403,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findMachineTypeId(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> list = service.findMachineTypeId(o);
|
||||
List<MachineBean> list = service.findMachineTypeId(o);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", list);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -442,8 +442,8 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
*/
|
||||
@RequestMapping(value = "machineBinding", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public com.lowagie.text.List<MachineBean> repairBinding(MachineBean o, HttpServletRequest request) {
|
||||
com.lowagie.text.List<MachineBean> list = new ArrayList<>();
|
||||
public List<MachineBean> repairBinding(MachineBean o, HttpServletRequest request) {
|
||||
List<MachineBean> list = new ArrayList<>();
|
||||
try {
|
||||
String deviceCode = o.getDeviceCode().toUpperCase();
|
||||
o.setDeviceCode(deviceCode);
|
||||
|
|
@ -454,7 +454,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
QRCodeBean qrBean = new QRCodeBean();
|
||||
qrBean.setCode(o.getQrcode());
|
||||
qrBean.setMaModelId(o.getModelId());
|
||||
com.lowagie.text.List<QRCodeBean> qrList = qrService.findQRCodeInfo(qrBean);
|
||||
List<QRCodeBean> qrList = qrService.findQRCodeInfo(qrBean);
|
||||
qrBean = qrList.get(0);
|
||||
o.setType(qrBean.getMaModelId());
|
||||
if (StringHelper.isEmpty(o.getVerderId())) {
|
||||
|
|
@ -518,8 +518,8 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes find(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> list = service.find(o);
|
||||
com.lowagie.text.List<MachineBean> list1 = service.findFile(o);
|
||||
List<MachineBean> list = service.find(o);
|
||||
List<MachineBean> list1 = service.findFile(o);
|
||||
MachineBean station = list.get(0);
|
||||
if (list1.size() > 0) {
|
||||
station.setFilePath(list1.get(0).getFilePath());
|
||||
|
|
@ -549,38 +549,38 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
MachineBean station5 = new MachineBean();
|
||||
MachineBean station6 = new MachineBean();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> listPicking = service.machinePicking(o);
|
||||
List<MachineBean> listPicking = service.machinePicking(o);
|
||||
if (listPicking != null && !listPicking.isEmpty()) {
|
||||
station1 = listPicking.get(0);
|
||||
}
|
||||
ar1.setSucceed(station1);
|
||||
|
||||
com.lowagie.text.List<MachineBean> listMaterialReturn = service.machineMaterialReturn(o);
|
||||
List<MachineBean> listMaterialReturn = service.machineMaterialReturn(o);
|
||||
if (listMaterialReturn != null && !listMaterialReturn.isEmpty()) {
|
||||
station2 = listMaterialReturn.get(0);
|
||||
}
|
||||
ar2.setSucceed(station2);
|
||||
|
||||
com.lowagie.text.List<MachineBean> listRepair = service.machineRepair(o);
|
||||
List<MachineBean> listRepair = service.machineRepair(o);
|
||||
if (listRepair != null && !listRepair.isEmpty()) {
|
||||
station3 = listRepair.get(0);
|
||||
}
|
||||
ar3.setSucceed(station3);
|
||||
|
||||
com.lowagie.text.List<MachineBean> listOverhaul = service.machineOverhaul(o);
|
||||
List<MachineBean> listOverhaul = service.machineOverhaul(o);
|
||||
if (listOverhaul != null && !listOverhaul.isEmpty()) {
|
||||
station4 = listOverhaul.get(0);
|
||||
}
|
||||
ar4.setSucceed(station4);
|
||||
|
||||
com.lowagie.text.List<MachineBean> listWarehousing = service.machineWarehousing(o);
|
||||
List<MachineBean> listWarehousing = service.machineWarehousing(o);
|
||||
if (listWarehousing != null && !listWarehousing.isEmpty()) {
|
||||
station5 = listWarehousing.get(0);
|
||||
}
|
||||
ar5.setSucceed(station5);
|
||||
|
||||
// 报废信息
|
||||
com.lowagie.text.List<MachineBean> listScrap = service.machineScrap(o);
|
||||
List<MachineBean> listScrap = service.machineScrap(o);
|
||||
if (listScrap != null && !listScrap.isEmpty()) {
|
||||
station6 = listScrap.get(0);
|
||||
}
|
||||
|
|
@ -609,7 +609,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findCode(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> list = service.findCode(o);
|
||||
List<MachineBean> list = service.findCode(o);
|
||||
MachineBean station = list.get(0);
|
||||
ar.setSucceed(station);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -655,7 +655,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
try {
|
||||
page.setPageSize(10000);
|
||||
Page<MachineBean> results = service.findByPageThree(o, page);
|
||||
com.lowagie.text.List<MachineBean> list = results.getResults();
|
||||
List<MachineBean> list = results.getResults();
|
||||
if (list != null) {
|
||||
for (MachineBean bean : list) {
|
||||
String type = bean.getType();
|
||||
|
|
@ -698,9 +698,9 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
}
|
||||
}
|
||||
|
||||
private void expOutExcel1(HttpServletResponse response, com.lowagie.text.List<MachineBean> list, String filename, String machineName,
|
||||
private void expOutExcel1(HttpServletResponse response, List<MachineBean> list, String filename, String machineName,
|
||||
String typeName) throws Exception {
|
||||
com.lowagie.text.List<Map<String, Object>> results = new ArrayList<Map<String, Object>>();
|
||||
List<Map<String, Object>> results = new ArrayList<Map<String, Object>>();
|
||||
if (list != null) {
|
||||
int size = list.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
|
|
@ -709,7 +709,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
results.add(maps);
|
||||
}
|
||||
}
|
||||
com.lowagie.text.List<String> headers = historyreportHeader();
|
||||
List<String> headers = historyreportHeader();
|
||||
|
||||
HSSFWorkbook workbook = POIOutputHelper1.excel(results, headers, filename, machineName, typeName);
|
||||
OutputStream out = null;
|
||||
|
|
@ -740,7 +740,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
return maps;
|
||||
}
|
||||
|
||||
private com.lowagie.text.List<String> historyreportHeader() {
|
||||
private List<String> historyreportHeader() {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
list.add("序号");
|
||||
list.add("操作类型");
|
||||
|
|
@ -772,7 +772,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findInfoData(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> list = service.findInfoData(o);
|
||||
List<MachineBean> list = service.findInfoData(o);
|
||||
ar.setSucceed(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
|
|
@ -814,7 +814,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findByLikeCodeNew(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> list = service.findByLikeCodeNew(o);
|
||||
List<MachineBean> list = service.findByLikeCodeNew(o);
|
||||
ar.setSucceed(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
|
|
@ -828,7 +828,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes getAlOutStorageInfoList(OutStorageBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<OutStorageBean> bean = service.getAlOutStorageInfoList(o);
|
||||
List<OutStorageBean> bean = service.getAlOutStorageInfoList(o);
|
||||
ar.setSucceed(bean);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
|
|
@ -844,7 +844,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
String deviceCode = request.getParameter("deviceCode");
|
||||
o.setDeviceCode(deviceCode);
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> list = service.findByCode(o);
|
||||
List<MachineBean> list = service.findByCode(o);
|
||||
if (list != null && list.size() > 0) {
|
||||
for (MachineBean bean : list) {
|
||||
results += bean.toString() + ";";
|
||||
|
|
@ -862,7 +862,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findByCode(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> list = service.findByCode(o);
|
||||
List<MachineBean> list = service.findByCode(o);
|
||||
ar.setSucceed(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
|
|
@ -876,7 +876,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findType(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> result = service.findType(o);
|
||||
List<MachineBean> result = service.findType(o);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -892,7 +892,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findModel(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> result = service.findModel(o);
|
||||
List<MachineBean> result = service.findModel(o);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -908,7 +908,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes findSums(MachineBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> result = service.findSums(o);
|
||||
List<MachineBean> result = service.findSums(o);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -930,7 +930,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public AjaxRes getBuyCompany() {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineBean> result = service.getBuyCompany();
|
||||
List<MachineBean> result = service.getBuyCompany();
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
ar.setSucceed(p);
|
||||
|
|
@ -951,28 +951,28 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
String res = "";
|
||||
try {
|
||||
if (StringHelper.isNotEmpty(o.getOutFactortNum())) {
|
||||
com.lowagie.text.List<MachineBean> list = service.findByOutFactortNum(o);
|
||||
List<MachineBean> list = service.findByOutFactortNum(o);
|
||||
if (list != null && list.size() > 0) {
|
||||
res += "<span style='color: red'>出厂编号</span>已存在,修改失败<br/>";
|
||||
flag1 = true;
|
||||
}
|
||||
}
|
||||
if (StringHelper.isNotEmpty(o.getDeviceCode())) {
|
||||
com.lowagie.text.List<MachineBean> list = service.findByCode(o);
|
||||
List<MachineBean> list = service.findByCode(o);
|
||||
if (list != null && list.size() > 0) {
|
||||
res += "<span style='color: red'>设备编码</span>已存在,修改失败<br/>";
|
||||
flag2 = true;
|
||||
}
|
||||
}
|
||||
if (StringHelper.isNotEmpty(o.getAssetNum())) {
|
||||
com.lowagie.text.List<MachineBean> list = service.findByAssetNum(o);
|
||||
List<MachineBean> list = service.findByAssetNum(o);
|
||||
if (list != null && list.size() > 0) {
|
||||
res += "<span style='color: red'>固资编号</span>已存在,修改失败<br/>";
|
||||
flag3 = true;
|
||||
}
|
||||
}
|
||||
if (StringHelper.isNotEmpty(o.getRemarks())) {
|
||||
com.lowagie.text.List<MachineBean> list = service.findByRemarkAndId(o);
|
||||
List<MachineBean> list = service.findByRemarkAndId(o);
|
||||
if (list != null && list.size() > 0) {
|
||||
res += "<span style='color: red'>该规格下该备注</span>已存在,修改失败<br/>";
|
||||
flag4 = true;
|
||||
|
|
@ -995,7 +995,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
}
|
||||
service.update(o);
|
||||
if (StringHelper.isNotEmpty(o.getBuyPrice())) {// 购置价格,购置价格在其他的数据表中所以单独写
|
||||
com.lowagie.text.List<MachineBean> list = service.findByType(o);
|
||||
List<MachineBean> list = service.findByType(o);
|
||||
o.setId(list.get(0).getType());
|
||||
service.updateType(o);
|
||||
}
|
||||
|
|
@ -1016,8 +1016,8 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
try {
|
||||
String gpsRes = "";
|
||||
String epcRes = "";
|
||||
com.lowagie.text.List<MachineBean> gps = service.findGps(o);
|
||||
com.lowagie.text.List<MachineBean> dev = service.findDev(o);
|
||||
List<MachineBean> gps = service.findGps(o);
|
||||
List<MachineBean> dev = service.findDev(o);
|
||||
String rfidEpc = o.getRfidEpc();
|
||||
if (gps.isEmpty()) {
|
||||
o.setRfidEpc(null);
|
||||
|
|
@ -1075,7 +1075,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
@RequestMapping(value = "ToQRCode", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public void ToQRCode(MachineBean o, HttpServletRequest request) throws Exception {
|
||||
com.lowagie.text.List<MachineBean> list = service.find(o);
|
||||
List<MachineBean> list = service.find(o);
|
||||
String company = list.get(0).getDeviceNum();
|
||||
String stockNums = findStockNums(o);
|
||||
int num = Integer.parseInt(stockNums) + 1;
|
||||
|
|
@ -1162,13 +1162,13 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
String inputType = request.getParameter("inputType");
|
||||
String deviceCode = o.getDeviceCode().toUpperCase();
|
||||
o.setDeviceCode(deviceCode);
|
||||
com.lowagie.text.List<MachineBean> list = service.findByCode(o);
|
||||
List<MachineBean> list = service.findByCode(o);
|
||||
if (list != null && list.size() > 0) {
|
||||
ar.setSucceed("2");
|
||||
} else {
|
||||
QRCodeBean qrBean = new QRCodeBean();
|
||||
qrBean.setCode(o.getQrcode());
|
||||
com.lowagie.text.List<QRCodeBean> qrList = qrService.findQRCodeInfo(qrBean);
|
||||
List<QRCodeBean> qrList = qrService.findQRCodeInfo(qrBean);
|
||||
qrBean = qrList.get(0);
|
||||
o.setType(qrBean.getMaModelId());
|
||||
o.setVerderId(qrBean.getVenderId());
|
||||
|
|
@ -1206,7 +1206,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
public synchronized AjaxRes bindingNums(MachineTypeBean mt, HttpServletRequest request, String userId) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
try {
|
||||
com.lowagie.text.List<MachineTypeBean> mtlist = mtservice.find(mt);
|
||||
List<MachineTypeBean> mtlist = mtservice.find(mt);
|
||||
String libNums = null;
|
||||
if (mtlist.size() > 0) {
|
||||
libNums = mtlist.get(0).getNums();// 库存数
|
||||
|
|
@ -1238,13 +1238,13 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
try {
|
||||
String deviceCode = o.getDeviceCode().toUpperCase();
|
||||
o.setDeviceCode(deviceCode);
|
||||
com.lowagie.text.List<MachineBean> list = service.findByCode(o);
|
||||
List<MachineBean> list = service.findByCode(o);
|
||||
if (list != null && list.size() > 0) {
|
||||
ar.setSucceed("2");
|
||||
} else {
|
||||
QRCodeBean qrBean = new QRCodeBean();
|
||||
qrBean.setCode(o.getQrcode());
|
||||
com.lowagie.text.List<QRCodeBean> qrList = qrService.findQRCodeInfo(qrBean);
|
||||
List<QRCodeBean> qrList = qrService.findQRCodeInfo(qrBean);
|
||||
qrBean = qrList.get(0);
|
||||
o.setClerk(o.getClerk());
|
||||
o.settOverhaulPersion(o.gettOverhaulPersion());
|
||||
|
|
@ -1277,8 +1277,8 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
qrBean.setCode(o.getQrcode());
|
||||
String maModelId = "";
|
||||
String typeId = "";
|
||||
com.lowagie.text.List<QRCodeBean> qrList = qrService.findQRCodeInfo(qrBean);
|
||||
com.lowagie.text.List<MachineBean> maList = service.findByCode(o);
|
||||
List<QRCodeBean> qrList = qrService.findQRCodeInfo(qrBean);
|
||||
List<MachineBean> maList = service.findByCode(o);
|
||||
if (qrList != null) {
|
||||
maModelId = qrList.get(0).getMaModelId();
|
||||
}
|
||||
|
|
@ -1324,7 +1324,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
String deviceNum = o.getDeviceNum();
|
||||
MachineBean maBean = service.findByQrcode(o);
|
||||
if (maBean == null) {
|
||||
com.lowagie.text.List<MachineBean> list = service.findByCode(o);
|
||||
List<MachineBean> list = service.findByCode(o);
|
||||
if (list.isEmpty()) {
|
||||
String stockNums = findStockNums();
|
||||
int numss = Integer.parseInt(stockNums) + 1;
|
||||
|
|
@ -1356,7 +1356,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
String res = "解绑成功";
|
||||
try {
|
||||
o.setQrcode(o.getQrcode().toUpperCase());
|
||||
com.lowagie.text.List<MachineBean> list = service.findByCode(o);
|
||||
List<MachineBean> list = service.findByCode(o);
|
||||
if (list != null && list.size() > 0) {
|
||||
MachineBean bean = list.get(0);
|
||||
service.unbinding(o);
|
||||
|
|
@ -1399,7 +1399,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
if (o.getDeviceType()==null || o.getDeviceType().equals("")){
|
||||
o.setDeviceType("1");
|
||||
}
|
||||
com.lowagie.text.List<MachineBean> list = service.export(o);
|
||||
List<MachineBean> list = service.export(o);
|
||||
if (list != null) {
|
||||
for (MachineBean bean : list) {
|
||||
String status = bean.getBatchStatus();
|
||||
|
|
@ -1475,9 +1475,9 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
* (Exception e) { logger.error(e.toString(), e); } }
|
||||
*/
|
||||
|
||||
private void expOutExcel(HttpServletResponse response, com.lowagie.text.List<MachineBean> list, String filename) throws Exception {
|
||||
private void expOutExcel(HttpServletResponse response, List<MachineBean> list, String filename) throws Exception {
|
||||
if (list != null) {
|
||||
com.lowagie.text.List<Map<String, Object>> results = new ArrayList<Map<String, Object>>();
|
||||
List<Map<String, Object>> results = new ArrayList<Map<String, Object>>();
|
||||
int size = list.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
MachineBean bean = list.get(i);
|
||||
|
|
@ -1485,7 +1485,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
results.add(maps);
|
||||
}
|
||||
|
||||
com.lowagie.text.List<String> headers = reportHeader();
|
||||
List<String> headers = reportHeader();
|
||||
HSSFWorkbook workbook = POIOutputHelper.excel(results, headers, filename);
|
||||
OutputStream out = null;
|
||||
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
||||
|
|
@ -1533,7 +1533,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
return maps;
|
||||
}
|
||||
|
||||
private com.lowagie.text.List<String> reportHeader() {
|
||||
private List<String> reportHeader() {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
list.add("序号");
|
||||
list.add("机具名称");
|
||||
|
|
@ -1616,7 +1616,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
service.insert(o);
|
||||
MachineTypeBean mt = new MachineTypeBean();
|
||||
mt.setId(o.getModel());
|
||||
com.lowagie.text.List<MachineTypeBean> mtlist = mtservice.find(mt);
|
||||
List<MachineTypeBean> mtlist = mtservice.find(mt);
|
||||
String libNums = null;
|
||||
if (mtlist.size() > 0) {
|
||||
libNums = mtlist.get(0).getNums();// 库存数
|
||||
|
|
@ -2166,7 +2166,7 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
}
|
||||
|
||||
public String getCode(MachineBean o) {
|
||||
com.lowagie.text.List<MachineBean> list = new ArrayList<MachineBean>();
|
||||
List<MachineBean> list = new ArrayList<MachineBean>();
|
||||
String msg = "1";
|
||||
try {
|
||||
list = service.getCode(o);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.ma.dao;
|
||||
|
||||
import com.lowagie.text.List;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.bonus.core.BonusBatis;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.bonus.lease.beans.OutStorageBean;
|
|||
import com.bonus.ma.beans.MachineBean;
|
||||
import com.bonus.sys.BaseService;
|
||||
import com.bonus.sys.Page;
|
||||
import com.lowagie.text.List;
|
||||
import java.util.List;
|
||||
|
||||
public interface MachineService extends BaseService<MachineBean> {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.lowagie.text.List;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
|
|||
Loading…
Reference in New Issue