|
@@ -858,7 +858,7 @@ public class IndexController {
|
|
|
* @param id
|
|
|
*/
|
|
|
private void saveProductSI320(Long id) {
|
|
|
- String[] str = {"冰淇淋-I01", "草莓酱-J01", "蓝莓酱-J02", "菠萝酱-J03", "榛子碎-C01", "花生碎-C02", "腰果碎-C03"};
|
|
|
+ String[] str = {"雪糕-I01", "果酱(1)-J01", "果酱(2)-J02", "果酱(3)-J03", "果碎(1)-C01", "果碎(2)-C02"};
|
|
|
|
|
|
for (int i = 0; i < str.length; i++) {
|
|
|
TProduct product = new TProduct();
|
|
@@ -1014,11 +1014,6 @@ public class IndexController {
|
|
|
@RequestMapping(value = "/updateProduct.htm", method = RequestMethod.POST, produces = "text/html;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
public String updateProduct(@RequestBody List<ProductVo> productVos) {
|
|
|
-// Double f = 0.00;
|
|
|
-// int num = 0;
|
|
|
-// int n = 0;
|
|
|
-// HashSet<Double> price = new HashSet<Double>();
|
|
|
-// HashSet<Double> minprice = new HashSet<Double>();
|
|
|
for (ProductVo product : productVos) {
|
|
|
String clientId = product.getClientId();
|
|
|
LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
@@ -1029,8 +1024,6 @@ public class IndexController {
|
|
|
LambdaQueryWrapper<TProduct> queryProduct = Wrappers.lambdaQuery();
|
|
|
queryProduct.eq(TProduct::getEquipmentId, id);
|
|
|
queryProduct.eq(TProduct::getProductName, product.getProductName());
|
|
|
-// List<TProduct> productList = productService.list(queryProduct);
|
|
|
-// TProduct tProduct = productList.get(0);
|
|
|
TProduct tProduct = productService.getOnly(queryProduct);
|
|
|
if (tProduct == null) {
|
|
|
LambdaQueryWrapper<TNameDictionary> wrapper = Wrappers.lambdaQuery();
|
|
@@ -1051,8 +1044,6 @@ public class IndexController {
|
|
|
LambdaQueryWrapper<TProduct> queryProduct = Wrappers.lambdaQuery();
|
|
|
queryProduct.eq(TProduct::getEquipmentId, id);
|
|
|
queryProduct.eq(TProduct::getProductName, product.getProductName());
|
|
|
-// List<TProduct> productList = productService.list(queryProduct);
|
|
|
-// TProduct tProduct = productList.get(0);
|
|
|
TProduct tProduct = productService.getOnly(queryProduct);
|
|
|
if (tProduct == null) {
|
|
|
LambdaQueryWrapper<TNameDictionary> wrapper = Wrappers.lambdaQuery();
|
|
@@ -1725,9 +1716,19 @@ public class IndexController {
|
|
|
LambdaQueryWrapper<TProduct> queryProduct = Wrappers.lambdaQuery();
|
|
|
queryProduct.eq(TProduct::getEquipmentId, equipment.getId());
|
|
|
List<TProduct> products = productService.list(queryProduct);
|
|
|
+ TEquipmentDesc equipmentDesc = equipmentDescService.getById(equipment.getId());
|
|
|
for (TProduct product : products) {
|
|
|
product.setCreateDate(null);
|
|
|
product.setModifyDate(null);
|
|
|
+ if (StringUtils.isNotEmpty(equipmentDesc.getLanguage()) && !equipmentDesc.getLanguage().equals("zh") && StringUtils.isEmpty(product.getName())) {
|
|
|
+ LambdaQueryWrapper<TNameDictionary> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(TNameDictionary::getLanguage, "zh");
|
|
|
+ queryWrapper.eq(TNameDictionary::getNo, product.getNo());
|
|
|
+ TNameDictionary nameDictionary = nameDictionaryService.getOne(queryWrapper);
|
|
|
+ if (nameDictionary != null) {
|
|
|
+ product.setProductName(nameDictionary.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
|
jsonObject1.put("code", 0);
|